diff options
author | Ross Burton <ross.burton@intel.com> | 2013-10-08 14:30:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-14 16:55:27 +0100 |
commit | 9877df030918b654e45f7d699cc6ff7314970f6f (patch) | |
tree | 59b4995ef91b1d78c6edbbd58981d5f92dc85eec /meta | |
parent | f11cb8dd2899ce7c95ed1a829d5f0ec40d7137c2 (diff) | |
download | poky-9877df030918b654e45f7d699cc6ff7314970f6f.tar.gz |
insane: configure option checking
(From OE-Core rev: 1b51688d2ea5174334cc8a8a559461b2c4a15a77)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/insane.bbclass | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 7ef3d8e0a0..d73cc2b9b0 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -42,6 +42,8 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ | |||
42 | 42 | ||
43 | ALL_QA = "${WARN_QA} ${ERROR_QA}" | 43 | ALL_QA = "${WARN_QA} ${ERROR_QA}" |
44 | 44 | ||
45 | UNKNOWN_CONFIGURE_WHITELIST ?= "--enable-nls --disable-nls --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot" | ||
46 | |||
45 | # | 47 | # |
46 | # dictionary for elf headers | 48 | # dictionary for elf headers |
47 | # | 49 | # |
@@ -916,6 +918,24 @@ Missing inherit gettext?""" % (gt, config)) | |||
916 | if not package_qa_check_license(workdir, d): | 918 | if not package_qa_check_license(workdir, d): |
917 | bb.fatal("Licensing Error: LIC_FILES_CHKSUM does not match, please fix") | 919 | bb.fatal("Licensing Error: LIC_FILES_CHKSUM does not match, please fix") |
918 | 920 | ||
921 | ########################################################################### | ||
922 | # Check unrecognised configure options (with a white list) | ||
923 | ########################################################################### | ||
924 | if bb.data.inherits_class("autotools", d): | ||
925 | bb.note("Checking configure output for unrecognised options") | ||
926 | try: | ||
927 | flag = "WARNING: unrecognized options:" | ||
928 | log = os.path.join(d.getVar('B', True), 'config.log') | ||
929 | output = subprocess.check_output(['grep', '-F', flag, log]) | ||
930 | options = set(map(lambda s: s.strip(' ,'), output.partition(flag)[2].split())) | ||
931 | whitelist = set(d.getVar("UNKNOWN_CONFIGURE_WHITELIST", True).split()) | ||
932 | options -= whitelist | ||
933 | if options: | ||
934 | pn = d.getVar('PN', True) | ||
935 | error_msg = pn + ": configure was passed unrecognised options: " + " ".join(options) | ||
936 | package_qa_handle_error("unknown-configure-option", error_msg, d) | ||
937 | except subprocess.CalledProcessError: | ||
938 | pass | ||
919 | } | 939 | } |
920 | # The Staging Func, to check all staging | 940 | # The Staging Func, to check all staging |
921 | #addtask qa_staging after do_populate_sysroot before do_build | 941 | #addtask qa_staging after do_populate_sysroot before do_build |