From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id C8A9D758E8 for ; Thu, 25 Jun 2015 16:53:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t5PGrZSR009624; Thu, 25 Jun 2015 17:53:35 +0100 Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gD_0Y5Qat-Hq; Thu, 25 Jun 2015 17:53:35 +0100 (BST) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t5PGrNNv009598 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 25 Jun 2015 17:53:34 +0100 Message-ID: <1435251203.10583.18.camel@linuxfoundation.org> From: Richard Purdie To: bitbake-devel Date: Thu, 25 Jun 2015 17:53:23 +0100 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Subject: [PATCH] cooker: Fire BuildCompleted before finishing the command X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2015 16:53:39 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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] Signed-off-by: Richard Purdie diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index d42b389..0dd3296 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1306,8 +1306,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 @@ -1339,8 +1339,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