summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/package.py')
-rw-r--r--meta/lib/oe/package.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index a79c668eaf..839e9a25a0 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -67,24 +67,23 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, qa_already_stripped=
67 # 4 - executable 67 # 4 - executable
68 # 8 - shared library 68 # 8 - shared library
69 # 16 - kernel module 69 # 16 - kernel module
70 def isELF(path): 70 def is_elf(path):
71 type = 0 71 exec_type = 0
72 ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\"")) 72 ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\""))
73 73
74 if ret: 74 if ret:
75 bb.error("split_and_strip_files: 'file %s' failed" % path) 75 bb.error("split_and_strip_files: 'file %s' failed" % path)
76 return type 76 return exec_type
77 77
78 # Not stripped
79 if "ELF" in result: 78 if "ELF" in result:
80 type |= 1 79 exec_type |= 1
81 if "not stripped" not in result: 80 if "not stripped" not in result:
82 type |= 2 81 exec_type |= 2
83 if "executable" in result: 82 if "executable" in result:
84 type |= 4 83 exec_type |= 4
85 if "shared" in result: 84 if "shared" in result:
86 type |= 8 85 exec_type |= 8
87 return type 86 return exec_type
88 87
89 88
90 elffiles = {} 89 elffiles = {}
@@ -119,7 +118,7 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, qa_already_stripped=
119 118
120 # It's a file (or hardlink), not a link 119 # It's a file (or hardlink), not a link
121 # ...but is it ELF, and is it already stripped? 120 # ...but is it ELF, and is it already stripped?
122 elf_file = isELF(file) 121 elf_file = is_elf(file)
123 if elf_file & 1: 122 if elf_file & 1:
124 if elf_file & 2: 123 if elf_file & 2:
125 if qa_already_stripped: 124 if qa_already_stripped: