mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 12:32:15 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
4495e8bae0
commit
50b8740fba
@@ -83,12 +83,10 @@ python uninative_changeinterp () {
|
||||
except oe.qa.NotELFFileError:
|
||||
continue
|
||||
|
||||
#bb.warn("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f))
|
||||
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:
|
||||
try:
|
||||
subprocess.check_output(("patchelf-uninative", "--set-interpreter",
|
||||
d.getVar("UNINATIVE_LOADER", True), f))
|
||||
except subprocess.CalledProcessError as e:
|
||||
bb.fatal("'%s' failed with exit code %d and the following output:\n%s" %
|
||||
(cmd, p.returncode, stdout))
|
||||
(e.cmd, e.returncode, e.output))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user