mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
b5fc88b3d3
commit
f46240c7ba
+9
-10
@@ -67,24 +67,23 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, qa_already_stripped=
|
|||||||
# 4 - executable
|
# 4 - executable
|
||||||
# 8 - shared library
|
# 8 - shared library
|
||||||
# 16 - kernel module
|
# 16 - kernel module
|
||||||
def isELF(path):
|
def is_elf(path):
|
||||||
type = 0
|
exec_type = 0
|
||||||
ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\""))
|
ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\""))
|
||||||
|
|
||||||
if ret:
|
if ret:
|
||||||
bb.error("split_and_strip_files: 'file %s' failed" % path)
|
bb.error("split_and_strip_files: 'file %s' failed" % path)
|
||||||
return type
|
return exec_type
|
||||||
|
|
||||||
# Not stripped
|
|
||||||
if "ELF" in result:
|
if "ELF" in result:
|
||||||
type |= 1
|
exec_type |= 1
|
||||||
if "not stripped" not in result:
|
if "not stripped" not in result:
|
||||||
type |= 2
|
exec_type |= 2
|
||||||
if "executable" in result:
|
if "executable" in result:
|
||||||
type |= 4
|
exec_type |= 4
|
||||||
if "shared" in result:
|
if "shared" in result:
|
||||||
type |= 8
|
exec_type |= 8
|
||||||
return type
|
return exec_type
|
||||||
|
|
||||||
|
|
||||||
elffiles = {}
|
elffiles = {}
|
||||||
@@ -119,7 +118,7 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, qa_already_stripped=
|
|||||||
|
|
||||||
# It's a file (or hardlink), not a link
|
# It's a file (or hardlink), not a link
|
||||||
# ...but is it ELF, and is it already stripped?
|
# ...but is it ELF, and is it already stripped?
|
||||||
elf_file = isELF(file)
|
elf_file = is_elf(file)
|
||||||
if elf_file & 1:
|
if elf_file & 1:
|
||||||
if elf_file & 2:
|
if elf_file & 2:
|
||||||
if qa_already_stripped:
|
if qa_already_stripped:
|
||||||
|
|||||||
Reference in New Issue
Block a user