[oe-commits] [openembedded-core] 16/50: insane.bbclass: Trigger unrecognzed configure option for meson

git at git.openembedded.org git at git.openembedded.org
Tue Apr 9 15:05:29 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 22efbce40bc73555ba86aedf920447c88373c57b
Author: Andreas Müller <schnitzeltony at gmail.com>
AuthorDate: Fri Apr 5 08:37:24 2019 +0200

    insane.bbclass: Trigger unrecognzed configure option for meson
    
    Tested with 'unknown-configure-option' in ERROR_QA:
    
    For meson (glib-2.0-native):
    1. add 'EXTRA_OEMESON_append = "-Dschnitzel=true -Dwurst=true"'
       | ERROR: glib-2.0-native-1_2.58.3-r0 do_configure: QA Issue: glib-2.0-native: configure was passed unrecognised options: schnitzel wurst [unknown-configure-option]
    2. add 'UNKNOWN_CONFIGURE_WHITELIST_append=" schnitzel"'
       | ERROR: glib-2.0-native-1_2.58.3-r0 do_configure: QA Issue: glib-2.0-native: configure was passed unrecognised options: wurst [unknown-configure-option]
    3. change to 'UNKNOWN_CONFIGURE_WHITELIST_append=" schnitzel wurst"'
       => builds without issues
    
    For autotools (readline-native):
    1. add 'EXTRA_OECONF = "--with-schnitzel --with-wurst"'
       | ERROR: readline-native-8.0-r0 do_configure: QA Issue: readline-native: configure was passed unrecognised options: --with-wurst --with-schnitzel [unknown-configure-option]
    2. add 'UNKNOWN_CONFIGURE_WHITELIST_append=" --with-schnitzel"'
       | ERROR: readline-native-8.0-r0 do_configure: QA Issue: readline-native: configure was passed unrecognised options: --with-wurst [unknown-configure-option]
    3. add 'UNKNOWN_CONFIGURE_WHITELIST_append=" --with-schnitzel --with-wurst"'
       => builds without issues
    
    Signed-off-by: Andreas Müller <schnitzeltony at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/insane.bbclass | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index b7893a4..7b0efc2 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1141,12 +1141,16 @@ Rerun configure task after fixing this."""
     ###########################################################################
     # Check unrecognised configure options (with a white list)
     ###########################################################################
-    if bb.data.inherits_class("autotools", d):
+    if bb.data.inherits_class("autotools", d) or bb.data.inherits_class("meson", d):
         bb.note("Checking configure output for unrecognised options")
         try:
-            flag = "WARNING: unrecognized options:"
-            log = os.path.join(d.getVar('B'), 'config.log')
-            output = subprocess.check_output(['grep', '-F', flag, log]).decode("utf-8").replace(', ', ' ')
+            if bb.data.inherits_class("autotools", d):
+                flag = "WARNING: unrecognized options:"
+                log = os.path.join(d.getVar('B'), 'config.log')
+            if bb.data.inherits_class("meson", d):
+                flag = "WARNING: Unknown options:"
+                log = os.path.join(d.getVar('T'), 'log.do_configure')
+            output = subprocess.check_output(['grep', '-F', flag, log]).decode("utf-8").replace(', ', ' ').replace('"', '')
             options = set()
             for line in output.splitlines():
                 options |= set(line.partition(flag)[2].split())

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list