Patchwork insane: handle recursive configures when checking for unknown configure options

login
register
mail settings
Submitter Ross Burton
Date Dec. 10, 2013, 7:38 p.m.
Message ID <1386704306-3021-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/63179/
State Accepted
Commit cd5d65a83f1c1b6458f456b9f76ecfcf91cc325d
Headers show

Comments

Ross Burton - Dec. 10, 2013, 7:38 p.m.
Some recipes have configure scripts that recursively call other configure
scripts (e.g. dropbear).  These multiple-line matches were not being handled
correctly, so iterate over every matching line instead of assuming only one line
was found.

[ YOCTO #5646 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/insane.bbclass |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index a51f504..e77e993 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -941,8 +941,10 @@  Missing inherit gettext?""" % (gt, config))
         try:
             flag = "WARNING: unrecognized options:"
             log = os.path.join(d.getVar('B', True), 'config.log')
-            output = subprocess.check_output(['grep', '-F', flag, log])
-            options = set(map(lambda s: s.strip(' ,'), output.partition(flag)[2].split()))
+            output = subprocess.check_output(['grep', '-F', flag, log]).replace(', ', ' ')
+            options = set()
+            for line in output.splitlines():
+                options |= set(line.partition(flag)[2].split())
             whitelist = set(d.getVar("UNKNOWN_CONFIGURE_WHITELIST", True).split())
             options -= whitelist
             if options: