diff options
Diffstat (limited to 'poky/meta/classes/insane.bbclass')
-rw-r--r-- | poky/meta/classes/insane.bbclass | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/poky/meta/classes/insane.bbclass b/poky/meta/classes/insane.bbclass index ee19ef673..c6dff9659 100644 --- a/poky/meta/classes/insane.bbclass +++ b/poky/meta/classes/insane.bbclass @@ -27,6 +27,7 @@ WARN_QA ?= " libdir xorg-driver-abi \ infodir build-deps src-uri-bad symlink-to-sysroot multilib \ invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \ mime mime-xdg unlisted-pkg-lics unhandled-features-check \ + missing-update-alternatives \ " ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ @@ -438,12 +439,13 @@ def package_qa_hash_style(path, name, d, elf, messages): for line in phdrs.split("\n"): if "SYMTAB" in line: has_syms = True - if "GNU_HASH" or "DT_MIPS_XHASH" in line: + if "GNU_HASH" in line or "DT_MIPS_XHASH" in line: sane = True if ("[mips32]" in line or "[mips64]" in line) and d.getVar('TCLIBC') == "musl": sane = True if has_syms and not sane: - package_qa_add_message(messages, "ldflags", "No GNU_HASH in the ELF binary %s, didn't pass LDFLAGS?" % path) + path = package_qa_clean_path(path, d, name) + package_qa_add_message(messages, "ldflags", "File %s in package %s doesn't have GNU_HASH (didn't pass LDFLAGS?)" % (path, name)) QAPATHTEST[buildpaths] = "package_qa_check_buildpaths" @@ -708,12 +710,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: @@ -987,6 +990,14 @@ def package_qa_check_unhandled_features_check(pn, d, messages): if var_set: package_qa_handle_error("unhandled-features-check", "%s: recipe doesn't inherit features_check" % pn, d) +QARECIPETEST[missing-update-alternatives] = "package_qa_check_missing_update_alternatives" +def package_qa_check_missing_update_alternatives(pn, d, messages): + # Look at all packages and find out if any of those sets ALTERNATIVE variable + # without inheriting update-alternatives class + for pkg in (d.getVar('PACKAGES') or '').split(): + if d.getVar('ALTERNATIVE_%s' % pkg) and not bb.data.inherits_class('update-alternatives', d): + package_qa_handle_error("missing-update-alternatives", "%s: recipe defines ALTERNATIVE_%s but doesn't inherit update-alternatives. This might fail during do_rootfs later!" % (pn, pkg), d) + # The PACKAGE FUNC to scan each package python do_package_qa () { import subprocess |