summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-02-11 07:59:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-11 12:31:43 +0000
commitc38f25377b6fd171c26fa667c1d7ac8bd314cb34 (patch)
treef3761f6994e442292a50b13c8f47e30341e0311d
parent906522260bbc0b96dc3c11f71fb5a23d8dab1072 (diff)
downloadpoky-c38f25377b6fd171c26fa667c1d7ac8bd314cb34.tar.gz
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>
-rw-r--r--meta/classes/uninative.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 580917b119..0448cf6cdc 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -84,5 +84,11 @@ python uninative_changeinterp () {
84 continue 84 continue
85 85
86 #bb.warn("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f)) 86 #bb.warn("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f))
87 subprocess.check_call("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f), shell=True) 87 cmd = "patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f)
88 p = subprocess.Popen(cmd, shell=True,
89 stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
90 stdout, stderr = p.communicate()
91 if p.returncode:
92 bb.fatal("'%s' failed with exit code %d and the following output:\n%s" %
93 (cmd, p.returncode, stdout))
88} 94}