summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorTobias Hagelborn <tobias.hagelborn@axis.com>2017-08-25 13:32:36 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-27 22:30:06 +0100
commitf46240c7ba1bb6dca421a9744bfb47c1bea44b74 (patch)
tree9072fdd8568a86d1b4c0b2fa819d37c623bef42e /meta/lib
parentb5fc88b3d35cc97c357ade91f0c9f376e3aed1cf (diff)
downloadpoky-f46240c7ba1bb6dca421a9744bfb47c1bea44b74.tar.gz
package.py: Fix some lint errors
- rename type to exec_type not to shadow type - rename isELF is_elf (From OE-Core rev: c72bd726d3e8495aae3e57f524c43b3be6367796) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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: