diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-28 17:09:58 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-29 10:39:41 +0100 |
commit | 85e8fb1c7a3baac5633ecdfb36113aec7f4235cb (patch) | |
tree | f0383002fccf56915b0c517cf32d7d54493d957a /meta/lib/oe/package.py | |
parent | 18160403427b2aab4207c939312fb0981c3f2d1b (diff) | |
download | openembedded-core-contrib-85e8fb1c7a3baac5633ecdfb36113aec7f4235cb.tar.gz |
lib/oe/package: Improve strip subprocess handling
Currently if the strip process fails, we get a message but don't know why. This adds
code to show the return value and any error output.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package.py')
-rw-r--r-- | meta/lib/oe/package.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index 8bc56c6e88e..947a97785a5 100644 --- a/meta/lib/oe/package.py +++ b/meta/lib/oe/package.py @@ -34,14 +34,14 @@ def runstrip(arg): stripcmd = "'%s' %s '%s' -o '%s.tmp' && chown --reference='%s' '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file, file, file) bb.debug(1, "runstrip: %s" % stripcmd) - ret = subprocess.call(stripcmd, shell=True) + try: + output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT, shell=True) + except subprocess.CalledProcessError as e: + bb.error("runstrip: '%s' strip command failed with %s (%s)" % (stripcmd, e.returncode, e.output)) if newmode: os.chmod(file, origmode) - if ret: - bb.error("runstrip: '%s' strip command failed" % stripcmd) - return |