<div dir="ltr">On 7 May 2013 22:55, Richard Purdie <span dir="ltr">&lt;<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>&gt;</span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Currently if errors occur early in the init process, the errors may<br>

not be shown to the user. This change ensures that if a failure does<br>
occur, the messages are flushed from the queue and shown to the user.<br>
<br>
Signed-off-by: Richard Purdie &lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt;<br>
---<br>
 bitbake/bin/bitbake |   21 ++++++++++++++++-----<br>
 1 file changed, 16 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake<br>
index 0e69207..e05ff5b 100755<br>
--- a/bitbake/bin/bitbake<br>
+++ b/bitbake/bin/bitbake<br>
@@ -240,11 +240,22 @@ Default BBFILES are the .bb files in the current directory.&quot;&quot;&quot;)<br>
<br>
     idle = server.getServerIdleCB()<br>
<br>
-    cooker = bb.cooker.BBCooker(configuration, idle, initialenv)<br>
-    cooker.parseCommandLine()<br>
-<br>
-    server.addcooker(cooker)<br>
-    server.saveConnectionDetails()<br>
+    try:<br>
+        cooker = bb.cooker.BBCooker(configuration, idle, initialenv)<br>
+        cooker.parseCommandLine()<br>
+<br>
+        server.addcooker(cooker)<br>
+        server.saveConnectionDetails()<br>
+    except:<br>
+        while True:<br>
+            import queue<br></blockquote><div style>import queue is Python 3. It is import Queue in Python 2.</div><div style>If I run bitbake when it is already running, I get:</div><div style><br></div><div style>ImportError: No module named queue</div>
<div style><div>ERROR: Only one copy of bitbake should be run against a build directory</div><div> <br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

+            try:<br>
+                event = server.event_queue.get(block=False)<br>
+            except (queue.Empty, IOError):<br>
+                break<br>
+            if isinstance(event, logging.LogRecord):<br>
+                logger.handle(event)<br>
+        raise<br>
     server.detach()<br>
<br>
     # Should no longer need to ever reference cooker<br>
<span class=""><font color="#888888">--<br>
1.7.10.4<br>
<br>
<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core" target="_blank">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br></div><div class="gmail_extra" style>Regards,</div><div class="gmail_extra" style>Jonathan</div></div>