summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-06-14 12:10:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-14 14:54:25 +0100
commit6964efddd31c479386d1643c1025bc102710392f (patch)
treed220a5eef331ffa4ea84e726392e038da01daa27 /bitbake
parent0cb0e96c946e9c7fa75a3cb2e48fd61e15f1d5e9 (diff)
downloadpoky-2.4_M1.tar.gz
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 <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 6a1b649f79..479dc5a114 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1361,8 +1361,10 @@ class BBCooker:
1361 return False 1361 return False
1362 1362
1363 if not retval: 1363 if not retval:
1364 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, targets, failures, interrupted), self.data) 1364 try:
1365 self.command.finishAsyncCommand(msg) 1365 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, targets, failures, interrupted), self.data)
1366 finally:
1367 self.command.finishAsyncCommand(msg)
1366 return False 1368 return False
1367 if retval is True: 1369 if retval is True:
1368 return True 1370 return True