summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-28 17:09:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-29 10:58:55 +0100
commit9eb4222e36a4b668b01efdb2c95b21a38dada4df (patch)
tree36833d31ef99895d43c1b4575373d006f98aab2e /meta
parent26997d1d21453447e952c32ada2a7faa1a849db7 (diff)
downloadpoky-9eb4222e36a4b668b01efdb2c95b21a38dada4df.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. (From OE-Core rev: 85e8fb1c7a3baac5633ecdfb36113aec7f4235cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/package.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 8bc56c6e88..947a97785a 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -34,14 +34,14 @@ def runstrip(arg):
34 stripcmd = "'%s' %s '%s' -o '%s.tmp' && chown --reference='%s' '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file, file, file) 34 stripcmd = "'%s' %s '%s' -o '%s.tmp' && chown --reference='%s' '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file, file, file)
35 bb.debug(1, "runstrip: %s" % stripcmd) 35 bb.debug(1, "runstrip: %s" % stripcmd)
36 36
37 ret = subprocess.call(stripcmd, shell=True) 37 try:
38 output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT, shell=True)
39 except subprocess.CalledProcessError as e:
40 bb.error("runstrip: '%s' strip command failed with %s (%s)" % (stripcmd, e.returncode, e.output))
38 41
39 if newmode: 42 if newmode:
40 os.chmod(file, origmode) 43 os.chmod(file, origmode)
41 44
42 if ret:
43 bb.error("runstrip: '%s' strip command failed" % stripcmd)
44
45 return 45 return
46 46
47 47