diff options
author | Andreas Müller <schnitzeltony@gmail.com> | 2019-04-05 08:37:24 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-11 21:15:57 +0100 |
commit | 9f7092416c40a96d9567bde99475de15a30e4989 (patch) | |
tree | 5a4fddb779db50f0342af635925287c019a8ab89 | |
parent | 50065038c0e69742191f927edacbd9f08b020580 (diff) | |
download | poky-9f7092416c40a96d9567bde99475de15a30e4989.tar.gz |
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
(From OE-Core rev: 30c001cdbc6207001b18e093ad9691e606428f0f)
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/insane.bbclass | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 4267cbd0f6..a9be88e816 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -1141,12 +1141,16 @@ Rerun configure task after fixing this.""" | |||
1141 | ########################################################################### | 1141 | ########################################################################### |
1142 | # Check unrecognised configure options (with a white list) | 1142 | # Check unrecognised configure options (with a white list) |
1143 | ########################################################################### | 1143 | ########################################################################### |
1144 | if bb.data.inherits_class("autotools", d): | 1144 | if bb.data.inherits_class("autotools", d) or bb.data.inherits_class("meson", d): |
1145 | bb.note("Checking configure output for unrecognised options") | 1145 | bb.note("Checking configure output for unrecognised options") |
1146 | try: | 1146 | try: |
1147 | flag = "WARNING: unrecognized options:" | 1147 | if bb.data.inherits_class("autotools", d): |
1148 | log = os.path.join(d.getVar('B'), 'config.log') | 1148 | flag = "WARNING: unrecognized options:" |
1149 | output = subprocess.check_output(['grep', '-F', flag, log]).decode("utf-8").replace(', ', ' ') | 1149 | log = os.path.join(d.getVar('B'), 'config.log') |
1150 | if bb.data.inherits_class("meson", d): | ||
1151 | flag = "WARNING: Unknown options:" | ||
1152 | log = os.path.join(d.getVar('T'), 'log.do_configure') | ||
1153 | output = subprocess.check_output(['grep', '-F', flag, log]).decode("utf-8").replace(', ', ' ').replace('"', '') | ||
1150 | options = set() | 1154 | options = set() |
1151 | for line in output.splitlines(): | 1155 | for line in output.splitlines(): |
1152 | options |= set(line.partition(flag)[2].split()) | 1156 | options |= set(line.partition(flag)[2].split()) |