diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-07 08:23:47 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-09 14:06:52 +0100 |
commit | f58e82b9e9cab8e497b70920c77fcac4f355bb91 (patch) | |
tree | eed453155ef35d1dc782e6f6e57ac8c46be985c0 /bitbake | |
parent | f81de1dbf624f1ccdc901f8c4f4f4a8201b21ff1 (diff) | |
download | poky-f58e82b9e9cab8e497b70920c77fcac4f355bb91.tar.gz |
bitbake: 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.
(Bitbake rev: fda84c4285e0bc31c249b6dd5464aeb6ad622a9a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index 0e69207de7..e05ff5bd38 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake | |||
@@ -240,11 +240,22 @@ Default BBFILES are the .bb files in the current directory.""") | |||
240 | 240 | ||
241 | idle = server.getServerIdleCB() | 241 | idle = server.getServerIdleCB() |
242 | 242 | ||
243 | cooker = bb.cooker.BBCooker(configuration, idle, initialenv) | 243 | try: |
244 | cooker.parseCommandLine() | 244 | cooker = bb.cooker.BBCooker(configuration, idle, initialenv) |
245 | 245 | cooker.parseCommandLine() | |
246 | server.addcooker(cooker) | 246 | |
247 | server.saveConnectionDetails() | 247 | server.addcooker(cooker) |
248 | server.saveConnectionDetails() | ||
249 | except: | ||
250 | while True: | ||
251 | import queue | ||
252 | try: | ||
253 | event = server.event_queue.get(block=False) | ||
254 | except (queue.Empty, IOError): | ||
255 | break | ||
256 | if isinstance(event, logging.LogRecord): | ||
257 | logger.handle(event) | ||
258 | raise | ||
248 | server.detach() | 259 | server.detach() |
249 | 260 | ||
250 | # Should no longer need to ever reference cooker | 261 | # Should no longer need to ever reference cooker |