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:19:19 +0100 |
commit | 2762e2e84bd38dbf11627eb676e32f21eaa28cd2 (patch) | |
tree | c6144e42031cc2f50509e1cdccf79454d1f019d0 /meta/classes/insane.bbclass | |
parent | f2e590d3a3610f987093815a65591cad090c217b (diff) | |
download | poky-2762e2e84bd38dbf11627eb676e32f21eaa28cd2.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.
(From OE-Core rev: c63af30d3b6350361daff94a59d4f14d7c5395e1)
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): | |||
709 | warnings = {} | 709 | warnings = {} |
710 | errors = {} | 710 | errors = {} |
711 | for path in pkgfiles[package]: | 711 | for path in pkgfiles[package]: |
712 | elf = oe.qa.ELFFile(path) | 712 | elf = None |
713 | try: | 713 | if os.path.isfile(path): |
714 | elf.open() | 714 | elf = oe.qa.ELFFile(path) |
715 | except (IOError, oe.qa.NotELFFileError): | 715 | try: |
716 | # IOError can happen if the packaging control files disappear, | 716 | elf.open() |
717 | elf = None | 717 | except oe.qa.NotELFFileError: |
718 | elf = None | ||
718 | for func in warnfuncs: | 719 | for func in warnfuncs: |
719 | func(path, package, d, elf, warnings) | 720 | func(path, package, d, elf, warnings) |
720 | for func in errorfuncs: | 721 | for func in errorfuncs: |