mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
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>
This commit is contained in:
@@ -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)
|
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)
|
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:
|
if newmode:
|
||||||
os.chmod(file, origmode)
|
os.chmod(file, origmode)
|
||||||
|
|
||||||
if ret:
|
|
||||||
bb.error("runstrip: '%s' strip command failed" % stripcmd)
|
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user