diff options
authorPaul Eggleton <>2017-06-14 12:10:25 +0200
committerRichard Purdie <>2017-06-14 14:54:25 +0100
commit6964efddd31c479386d1643c1025bc102710392f (patch)
parent0cb0e96c946e9c7fa75a3cb2e48fd61e15f1d5e9 (diff)
bitbake: cooker: ensure graceful exit after exception during BuildCompleted handler2.4_M1
If an event handler for bb.event.BuildCompleted fails, we still need to call finishAsyncCommand() or else BitBake will just exit immediately without showing any error summary, or worse in the case of memory resident mode BitBake will hang and if you Ctrl+C to break out, the command won't be marked as finished which means that no further commands will be able to be executed until the server is manually restarted. (Bitbake rev: 5639faa3eef55cc476a82e810e61ca228cbdf221) Signed-off-by: Paul Eggleton <> Signed-off-by: Richard Purdie <>
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ b/bitbake/lib/bb/
index 6a1b649..479dc5a 100644
--- a/bitbake/lib/bb/
+++ b/bitbake/lib/bb/
@@ -1361,8 +1361,10 @@ class BBCooker:
return False
if not retval:
-, buildname, targets, failures, interrupted),
- self.command.finishAsyncCommand(msg)
+ try:
+, buildname, targets, failures, interrupted),
+ finally:
+ self.command.finishAsyncCommand(msg)
return False
if retval is True:
return True