diff options
author | Ross Burton <ross@burtonini.com> | 2020-09-03 13:43:19 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-05 22:18:12 +0100 |
commit | c63af30d3b6350361daff94a59d4f14d7c5395e1 (patch) | |
tree | bc2361db3c5187bcaf3041f0b439f97c4db70b17 /meta/classes/insane.bbclass | |
parent | ce48e7d72fc9b747f9c35191d1954a58544ccfe1 (diff) | |
download | openembedded-core-c63af30d3b6350361daff94a59d4f14d7c5395e1.tar.gz |
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.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r-- | meta/classes/insane.bbclass | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index d7f8f919c3..c38720afdb 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -709,12 +709,13 @@ def package_qa_walk(warnfuncs, errorfuncs, package, d): warnings = {} errors = {} for path in pkgfiles[package]: - elf = oe.qa.ELFFile(path) - try: - elf.open() - except (IOError, oe.qa.NotELFFileError): - # IOError can happen if the packaging control files disappear, - elf = None + elf = None + if os.path.isfile(path): + elf = oe.qa.ELFFile(path) + try: + elf.open() + except oe.qa.NotELFFileError: + elf = None for func in warnfuncs: func(path, package, d, elf, warnings) for func in errorfuncs: |