uninative.bbclass: capture stdout/err from patchelf-uninative
When patchelf-uninative fails, reporting only the exit code as done by subprocess.check_call() is not enough to understand the problem. We also need to capture and report the output of the command. (From OE-Core rev: 87e744791e59806d0c87b37d72ff32a96bbcb929) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
906522260b
commit
c38f25377b
|
@ -84,5 +84,11 @@ python uninative_changeinterp () {
|
|||
continue
|
||||
|
||||
#bb.warn("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f))
|
||||
subprocess.check_call("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f), shell=True)
|
||||
cmd = "patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f)
|
||||
p = subprocess.Popen(cmd, shell=True,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
stdout, stderr = p.communicate()
|
||||
if p.returncode:
|
||||
bb.fatal("'%s' failed with exit code %d and the following output:\n%s" %
|
||||
(cmd, p.returncode, stdout))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue