<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 8, 2013 at 7:30 AM, Ross Burton <span dir="ltr">&lt;<a href="mailto:ross.burton@intel.com" target="_blank">ross.burton@intel.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":i9" style="overflow:hidden">+    ###########################################################################<br>


+    # Check unrecognised configure options (with a white list)<br>
+    ###########################################################################<br>
+    if <span class="il">bb</span>.data.inherits_class(&quot;autotools&quot;, d):<br>
+        <span class="il">bb</span>.note(&quot;Checking configure output for unrecognised options&quot;)<br>
+        try:<br>
+            flag = &quot;WARNING: unrecognized options:&quot;<br>
+            log = os.path.join(d.getVar(&#39;B&#39;, True), &#39;config.log&#39;)<br>
+            output = subprocess.check_output([&#39;grep&#39;, &#39;-F&#39;, flag, log])<br>
+            options = set(map(lambda s: s.strip(&#39; ,&#39;), output.partition(flag)[2].split()))<br>
+            whitelist = set(d.getVar(&quot;UNKNOWN_CONFIGURE_WHITELIST&quot;, True).split())<br>
+            options -= whitelist<br>
+            if options:<br>
+               pn = d.getVar(&#39;PN&#39;, True)<br>
+                error_msg = pn + &quot;: configure was passed unrecognised options: &quot; + &quot; &quot;.join(options)<br>
+                package_qa_handle_error(&quot;unknown-configure-option&quot;, error_msg, d)<br>
+        except subprocess.CalledProcessError:<br>
+            pass</div></blockquote></div><br>Why is the entire block in the try/except rather than just the subprocess.check_output()?<br>-- <br>Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>

Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics
</div></div>