From 58b038b7783b32aeb8ee138728b6d801dacd7da4 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 25 Jun 2015 17:53:23 +0100 Subject: bitbake: cooker: Fire BuildCompleted before finishing the command Some handlers hook on BuildComplete so it avoids certain event races to finish the command after the BuildComplete event is sent out. This means the UI is available to handle events until the command completes. What appears to be a race on one of the sanity tests for event handlers triggered this change although the failure is hard to reproduce. [YOCTO #7921] (Bitbake rev: ac66fac162e68b568f986fe1917772e61c982f8e) Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 9c101f2e72..f32dae0f58 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1303,8 +1303,8 @@ class BBCooker: return False if not retval: - self.command.finishAsyncCommand(msg) bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.expanded_data) + self.command.finishAsyncCommand(msg) return False if retval is True: return True @@ -1336,8 +1336,8 @@ class BBCooker: return False if not retval: - self.command.finishAsyncCommand(msg) bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, targets, failures), self.data) + self.command.finishAsyncCommand(msg) return False if retval is True: return True -- cgit v1.2.3-54-g00ecf