Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id C9793E00AA6; Mon, 28 Sep 2015 08:44:56 -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.24 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 9D524E00AA6 for ; Mon, 28 Sep 2015 08:44:54 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 28 Sep 2015 08:44:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,603,1437462000"; d="scan'208";a="814762702" Received: from linux.intel.com ([10.23.219.25]) by orsmga002.jf.intel.com with ESMTP; 28 Sep 2015 08:44:54 -0700 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.51]) by linux.intel.com (Postfix) with ESMTP id 9F3206A4005 for ; Mon, 28 Sep 2015 08:43:58 -0700 (PDT) From: Ed Bartosh To: toaster@yoctoproject.org Date: Mon, 28 Sep 2015 18:44:41 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [PATCH 1/6] event: add new property to BuildBase class 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: Mon, 28 Sep 2015 15:44:56 -0000 Added 'task' property to the base class of BuildStarted and BuildCompleted classes to store bitbake task if it's specified. This is done as without task Build* events can't fully represent bitbake build. Task information is needed by UI classes to properly show or process Build* events. Signed-off-by: Ed Bartosh --- bitbake/lib/bb/event.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 366bc41..68496e5 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py @@ -331,6 +331,7 @@ class BuildBase(Event): def __init__(self, n, p, failures = 0): self._name = n self._pkgs = p + self._task = None Event.__init__(self) self._failures = failures @@ -352,6 +353,12 @@ class BuildBase(Event): def setCfg(self, cfg): self.data = cfg + def getTask(self): + return self._task + + def setTask(self, task): + self._task = task + def getFailures(self): """ Return the number of failed packages @@ -361,6 +368,7 @@ class BuildBase(Event): pkgs = property(getPkgs, setPkgs, None, "pkgs property") name = property(getName, setName, None, "name property") cfg = property(getCfg, setCfg, None, "cfg property") + task = property(getTask, setTask, None, "task property") -- 2.1.4