1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

insane: only load real files as ELF

The file path checks are passed an ELF object if the file is an ELF. It
doesn't make a lot of sense to load symlinks to ELFs as if they're in
the same package then the real file will be checked too.

This should speed up do_package_qa slightly as libraries won't be
scanned repeatedly.

(From OE-Core rev: c63af30d3b6350361daff94a59d4f14d7c5395e1)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2020-09-03 13:43:19 +01:00
committed by Richard Purdie
parent f2e590d3a3
commit 2762e2e84b
+7 -6
View File
@@ -709,12 +709,13 @@ def package_qa_walk(warnfuncs, errorfuncs, package, d):
warnings = {} warnings = {}
errors = {} errors = {}
for path in pkgfiles[package]: for path in pkgfiles[package]:
elf = oe.qa.ELFFile(path) elf = None
try: if os.path.isfile(path):
elf.open() elf = oe.qa.ELFFile(path)
except (IOError, oe.qa.NotELFFileError): try:
# IOError can happen if the packaging control files disappear, elf.open()
elf = None except oe.qa.NotELFFileError:
elf = None
for func in warnfuncs: for func in warnfuncs:
func(path, package, d, elf, warnings) func(path, package, d, elf, warnings)
for func in errorfuncs: for func in errorfuncs: