diff options
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 |