[oe-commits] [bitbake] 02/02: cooker: ensure graceful exit after exception during BuildCompleted handler
git at git.openembedded.org
git at git.openembedded.org
Wed Jun 14 10:16:36 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 5639faa3eef55cc476a82e810e61ca228cbdf221
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Wed Jun 14 12:10:25 2017 +0200
cooker: ensure graceful exit after exception during BuildCompleted handler
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.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/cooker.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 6a1b649..479dc5a 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1361,8 +1361,10 @@ class BBCooker:
return False
if not retval:
- bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, targets, failures, interrupted), self.data)
- self.command.finishAsyncCommand(msg)
+ try:
+ bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, targets, failures, interrupted), self.data)
+ finally:
+ self.command.finishAsyncCommand(msg)
return False
if retval is True:
return True
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list