summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-02-23 21:10:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-28 11:32:59 +0000
commit50b8740fba8dba11e9f5256c08ebdb869cd57911 (patch)
tree51bd7888d1c77667f3a3690c28988645bf9a5ae1
parent4495e8bae03a96d5ae55e588309fa2cdf7e9f4a5 (diff)
downloadpoky-50b8740fba8dba11e9f5256c08ebdb869cd57911.tar.gz
uninative: use check_output instead of Popen directly
(From OE-Core rev: 938687db0255d749ed8110d68628e505967b7131) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/uninative.bbclass12
1 files changed, 5 insertions, 7 deletions
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 7e225e6f15..270c1b0be4 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -83,12 +83,10 @@ python uninative_changeinterp () {
83 except oe.qa.NotELFFileError: 83 except oe.qa.NotELFFileError:
84 continue 84 continue
85 85
86 #bb.warn("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f)) 86 try:
87 cmd = "patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f) 87 subprocess.check_output(("patchelf-uninative", "--set-interpreter",
88 p = subprocess.Popen(cmd, shell=True, 88 d.getVar("UNINATIVE_LOADER", True), f))
89 stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 89 except subprocess.CalledProcessError as e:
90 stdout, stderr = p.communicate()
91 if p.returncode:
92 bb.fatal("'%s' failed with exit code %d and the following output:\n%s" % 90 bb.fatal("'%s' failed with exit code %d and the following output:\n%s" %
93 (cmd, p.returncode, stdout)) 91 (e.cmd, e.returncode, e.output))
94} 92}