Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 192F2E00B72; Wed, 30 Sep 2015 06:31:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.65 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 9644FE00992 for ; Wed, 30 Sep 2015 06:31:50 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 30 Sep 2015 06:31:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,612,1437462000"; d="scan'208";a="816222459" Received: from linux.intel.com ([10.23.219.25]) by fmsmga002.fm.intel.com with ESMTP; 30 Sep 2015 06:31:38 -0700 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.51]) by linux.intel.com (Postfix) with ESMTP id 65BD86A4090 for ; Wed, 30 Sep 2015 06:30:41 -0700 (PDT) From: Ed Bartosh To: toaster@yoctoproject.org Date: Wed, 30 Sep 2015 16:30:50 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [PATCH 2/6] event: add new parameter to Build* event APIs X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2015 13:31:52 -0000 Added 't'(task) parameter to BuildStarted and BuildCompleted event APIs. Modified existing calls of above mentioned APIs: passed bitbake task name as a parameter. Signed-off-by: Ed Bartosh --- bitbake/lib/bb/cooker.py | 8 ++++---- bitbake/lib/bb/event.py | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index a0d7d59..ef81c3a 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1313,7 +1313,7 @@ class BBCooker: taskdata.add_provider(self.data, self.recipecache, item) buildname = self.data.getVar("BUILDNAME", True) - bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.expanded_data) + bb.event.fire(bb.event.BuildStarted(buildname, [item], task), self.expanded_data) # Execute the runqueue if not task.startswith("do_"): @@ -1345,7 +1345,7 @@ class BBCooker: return False if not retval: - bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures, interrupted), self.expanded_data) + bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, task, failures, interrupted), self.expanded_data) self.command.finishAsyncCommand(msg) return False if retval is True: @@ -1381,7 +1381,7 @@ class BBCooker: return False if not retval: - bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, targets, failures, interrupted), self.data) + bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, targets, task, failures, interrupted), self.data) self.command.finishAsyncCommand(msg) return False if retval is True: @@ -1394,7 +1394,7 @@ class BBCooker: taskdata, runlist, fulltargetlist = self.buildTaskData(targets, task, self.configuration.abort) buildname = self.data.getVar("BUILDNAME", False) - bb.event.fire(bb.event.BuildStarted(buildname, fulltargetlist), self.data) + bb.event.fire(bb.event.BuildStarted(buildname, fulltargetlist, task), self.data) rq = bb.runqueue.RunQueue(self, self.data, self.recipecache, taskdata, runlist) if 'universe' in targets: diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 68496e5..bf67ee9 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py @@ -328,10 +328,10 @@ class StampUpdate(Event): class BuildBase(Event): """Base class for bbmake run events""" - def __init__(self, n, p, failures = 0): + def __init__(self, n, p, t, failures = 0): self._name = n self._pkgs = p - self._task = None + self._task = t Event.__init__(self) self._failures = failures @@ -376,19 +376,19 @@ class BuildBase(Event): class BuildStarted(BuildBase, OperationStarted): """bbmake build run started""" - def __init__(self, n, p, failures = 0): + def __init__(self, n, p, t, failures = 0): OperationStarted.__init__(self, "Building Started") - BuildBase.__init__(self, n, p, failures) + BuildBase.__init__(self, n, p, t, failures) class BuildCompleted(BuildBase, OperationCompleted): """bbmake build run completed""" - def __init__(self, total, n, p, failures=0, interrupted=0): + def __init__(self, total, n, p, t, failures=0, interrupted=0): if not failures: OperationCompleted.__init__(self, total, "Building Succeeded") else: OperationCompleted.__init__(self, total, "Building Failed") self._interrupted = interrupted - BuildBase.__init__(self, n, p, failures) + BuildBase.__init__(self, n, p, t, failures) class DiskFull(Event): """Disk full case build aborted""" -- 2.1.4