diff options
Diffstat (limited to 'meta/lib/oe/package.py')
-rw-r--r-- | meta/lib/oe/package.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index 4f3e21ad40..8a303106a9 100644 --- a/meta/lib/oe/package.py +++ b/meta/lib/oe/package.py | |||
@@ -56,7 +56,7 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, qa_already_stripped= | |||
56 | :param qa_already_stripped: Set to True if already-stripped' in ${INSANE_SKIP} | 56 | :param qa_already_stripped: Set to True if already-stripped' in ${INSANE_SKIP} |
57 | This is for proper logging and messages only. | 57 | This is for proper logging and messages only. |
58 | """ | 58 | """ |
59 | import stat, errno, oe.path, oe.utils, mmap | 59 | import stat, errno, oe.path, oe.utils, mmap, subprocess |
60 | 60 | ||
61 | # Detect .ko module by searching for "vermagic=" string | 61 | # Detect .ko module by searching for "vermagic=" string |
62 | def is_kernel_module(path): | 62 | def is_kernel_module(path): |
@@ -72,11 +72,7 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, qa_already_stripped= | |||
72 | # 16 - kernel module | 72 | # 16 - kernel module |
73 | def is_elf(path): | 73 | def is_elf(path): |
74 | exec_type = 0 | 74 | exec_type = 0 |
75 | ret, result = oe.utils.getstatusoutput("file -b '%s'" % path) | 75 | result = subprocess.check_output(["file", "-b", path], stderr=subprocess.STDOUT).decode("utf-8") |
76 | |||
77 | if ret: | ||
78 | bb.error("split_and_strip_files: 'file %s' failed" % path) | ||
79 | return exec_type | ||
80 | 76 | ||
81 | if "ELF" in result: | 77 | if "ELF" in result: |
82 | exec_type |= 1 | 78 | exec_type |= 1 |