diff options
author | Guido Günther <agx@sigxcpu.org> | 2010-02-15 13:52:13 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-02-15 13:52:13 +0100 |
commit | dcc6a2376ec4238205d3fb351d9357587886b6c5 (patch) | |
tree | 4cda9c6930e3a81ed6e42962c8764ba9604c8b72 | |
parent | 94eb78c65419d201394a8636d26726e44424503d (diff) |
Handle package build errors.
-rw-r--r-- | make-sgpkg.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/make-sgpkg.py b/make-sgpkg.py index 9fbf2d4..c363eb3 100644 --- a/make-sgpkg.py +++ b/make-sgpkg.py @@ -152,8 +152,14 @@ usr/lib/sapgui/SAPGUI%(version)s/inst/hicolor/16x16/apps/SAPClients.png /usr/sha def build_sapgui_deb(tmpdir): curdir = os.path.abspath(os.path.curdir) + build_cmd = ["fakeroot", "dpkg-buildpackage", "-b" ,"-uc", "-us"] os.chdir(tmpdir) - subprocess.call(["fakeroot", "dpkg-buildpackage", "-b" ,"-uc", "-us"]) + try: + ret = subprocess.call(build_cmd) + except OSError, msg: + raise SapGuiPkgError, "Cannot run '%s': %s" % (" ".join(build_cmd), msg) + if ret: + raise SapGuiPkgError, "Error building package." os.chdir(curdir) |