From: Ciaran Gultnieks Date: Mon, 24 Sep 2012 13:06:15 +0000 (+0100) Subject: Better output when prebuild command fails X-Git-Tag: 0.1~733 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=80edc5d79b11c55abfbc9f2dbc24b2e0b5a1b9d8;p=fdroidserver.git Better output when prebuild command fails --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 3c6695ff..698b3206 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1275,8 +1275,11 @@ def prepare_source(vcs, app, build, build_dir, extlib_dir, sdk_path, ndk_path, j prebuild = prebuild.replace('$$' + name + '$$', libpath) prebuild = prebuild.replace('$$SDK$$', sdk_path) prebuild = prebuild.replace('$$NDK$$', ndk_path) - if subprocess.call(prebuild, cwd=root_dir, shell=True) != 0: - raise BuildException("Error running pre-build command") + p = subprocess.Popen(prebuild, cwd=root_dir, shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = p.communicate() + if p.returncode != 0: + raise BuildException("Error running pre-build command", out, err) # Special case init functions for funambol... if build.get('initfun', 'no') == "yes":