summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-20 08:29:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-24 11:52:27 +0100
commit0e6a662ba2d03d6339593880b1c21c5455b59316 (patch)
tree3997177feec5826704d41ecf7ea43ce15ef28b8e /meta/classes/package.bbclass
parent29482de968e824bfa3edd5d7237cef22e85cf880 (diff)
downloadpoky-0e6a662ba2d03d6339593880b1c21c5455b59316.tar.gz
poky-0e6a662ba2d03d6339593880b1c21c5455b59316.tar.bz2
poky-0e6a662ba2d03d6339593880b1c21c5455b59316.zip
package: Don't use subshell to execute file
We don't need any functionality from the shell here, its just extra fork overhead. Therefore remove it and use subprocess directly. (From OE-Core rev: bcc03ea19e103f6aa93bada2f49fcc5cc7bc0790) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass8
1 files changed, 2 insertions, 6 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 7a49e4f351..02914b52bb 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -888,6 +888,7 @@ python fixup_perms () {
python split_and_strip_files () {
import stat, errno
+ import subprocess
dvar = d.getVar('PKGD')
pn = d.getVar('PN')
@@ -933,12 +934,7 @@ python split_and_strip_files () {
# 16 - kernel module
def isELF(path):
type = 0
- ret, result = oe.utils.getstatusoutput("file -b '%s'" % path)
-
- if ret:
- msg = "split_and_strip_files: 'file %s' failed" % path
- package_qa_handle_error("split-strip", msg, d)
- return type
+ result = subprocess.check_output(["file", "-b", path], stderr=subprocess.STDOUT).decode("utf-8")
# Not stripped
if "ELF" in result: