1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-04 02:00:04 +00:00

bitbake: 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.

(Bitbake rev: 5639faa3eef55cc476a82e810e61ca228cbdf221)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton
2017-06-14 12:10:25 +02:00
committed by Richard Purdie
parent 0cb0e96c94
commit 6964efddd3
+4 -2
View File
@@ -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