[bitbake-devel] [PATCH 1/6] event: add new property to BuildBase class

Elliot Smith elliot.smith at intel.com
Mon Oct 5 09:43:13 UTC 2015


From: Ed Bartosh <ed.bartosh at linux.intel.com>

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 <ed.bartosh at linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 lib/bb/event.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/bb/event.py b/lib/bb/event.py
index 366bc41..68496e5 100644
--- a/lib/bb/event.py
+++ b/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")
 
 
 
-- 
1.9.3

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the bitbake-devel mailing list