summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-07 08:23:47 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-07 14:03:07 +0100
commitfda84c4285e0bc31c249b6dd5464aeb6ad622a9a (patch)
tree6017df117eecc403cf8196e9b2b675d80d46a18a /bin
parenta9b1e7c2ad13ff47acb629bae082d4f96e174f99 (diff)
downloadbitbake-fda84c4285e0bc31c249b6dd5464aeb6ad622a9a.tar.gz
bin/bitbake: Ensure early errors are shown to the user
Currently if errors occur early in the init process, the errors may not be shown to the user. This change ensures that if a failure does occur, the messages are flushed from the queue and shown to the user. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake21
1 files changed, 16 insertions, 5 deletions
diff --git a/bin/bitbake b/bin/bitbake
index 0e69207de..e05ff5bd3 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -240,11 +240,22 @@ Default BBFILES are the .bb files in the current directory.""")
idle = server.getServerIdleCB()
- cooker = bb.cooker.BBCooker(configuration, idle, initialenv)
- cooker.parseCommandLine()
-
- server.addcooker(cooker)
- server.saveConnectionDetails()
+ try:
+ cooker = bb.cooker.BBCooker(configuration, idle, initialenv)
+ cooker.parseCommandLine()
+
+ server.addcooker(cooker)
+ server.saveConnectionDetails()
+ except:
+ while True:
+ import queue
+ try:
+ event = server.event_queue.get(block=False)
+ except (queue.Empty, IOError):
+ break
+ if isinstance(event, logging.LogRecord):
+ logger.handle(event)
+ raise
server.detach()
# Should no longer need to ever reference cooker