diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2019-03-07 11:41:22 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-07 21:54:58 +0000 |
commit | 4b86ebb6a87f75421a1d12d9d5dde303938c2e9f (patch) | |
tree | 09e3a8ee911861b4a24f1c59c8bcc3e173b1ead3 /meta/classes/insane.bbclass | |
parent | 756d6419f10d388c5daa63b7607e580d8b5079f1 (diff) | |
download | openembedded-core-contrib-4b86ebb6a87f75421a1d12d9d5dde303938c2e9f.tar.gz |
insane.bbclass: Add configure-unsafe and configure-gettext
So that the errors can be controlled by ERROR_QA or WARN_QA, and make them work
with INSANE_SKIP.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r-- | meta/classes/insane.bbclass | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 2fd0ecc24b..a2adfee835 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -33,7 +33,8 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ split-strip packages-list pkgv-undefined var-undefined \ version-going-backwards expanded-d invalid-chars \ - license-checksum dev-elf file-rdeps \ + license-checksum dev-elf file-rdeps configure-unsafe \ + configure-gettext \ " # Add usrmerge QA check based on distro feature ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}" @@ -1059,15 +1060,22 @@ python do_qa_configure() { configs = [] workdir = d.getVar('WORKDIR') - if bb.data.inherits_class('autotools', d): + skip = (d.getVar('INSANE_SKIP') or "").split() + skip_configure_unsafe = False + if 'configure-unsafe' in skip: + bb.note("Recipe %s skipping qa checking: configure-unsafe" % d.getVar('PN')) + skip_configure_unsafe = True + + if bb.data.inherits_class('autotools', d) and not skip_configure_unsafe: bb.note("Checking autotools environment for common misconfiguration") for root, dirs, files in os.walk(workdir): statement = "grep -q -F -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s" % \ os.path.join(root,"config.log") if "config.log" in files: if subprocess.call(statement, shell=True) == 0: - bb.fatal("""This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. -Rerun configure task after fixing this.""") + error_msg = """This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. +Rerun configure task after fixing this.""" + package_qa_handle_error("configure-unsafe", error_msg, d) if "configure.ac" in files: configs.append(os.path.join(root,"configure.ac")) @@ -1078,8 +1086,14 @@ Rerun configure task after fixing this.""") # Check gettext configuration and dependencies are correct ########################################################################### + skip_configure_gettext = False + if 'configure-gettext' in skip: + bb.note("Recipe %s skipping qa checking: configure-gettext" % d.getVar('PN')) + skip_configure_gettext = True + cnf = d.getVar('EXTRA_OECONF') or "" - if "gettext" not in d.getVar('P') and "gcc-runtime" not in d.getVar('P') and "--disable-nls" not in cnf: + if not ("gettext" in d.getVar('P') or "gcc-runtime" in d.getVar('P') or \ + "--disable-nls" in cnf or skip_configure_gettext): ml = d.getVar("MLPREFIX") or "" if bb.data.inherits_class('cross-canadian', d): gt = "nativesdk-gettext" @@ -1090,8 +1104,8 @@ Rerun configure task after fixing this.""") for config in configs: gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config if subprocess.call(gnu, shell=True) == 0: - bb.fatal("""%s required but not in DEPENDS for file %s. -Missing inherit gettext?""" % (gt, config)) + error_msg = "%s required but not in DEPENDS for file %s. Missing inherit gettext?" + package_qa_handle_error("configure-gettext", error_msg, d) ########################################################################### # Check unrecognised configure options (with a white list) |