[bitbake-devel,1/3] build: Create package property for TaskBase

Submitted by Tomasz Meresiński on Oct. 29, 2018, 4:39 p.m. | Patch ID: 155963

Details

Message ID 20181029163933.26646-2-tomasz.meresinski@comarch.pl
State New
Headers show

Commit Message

Tomasz Meresiński Oct. 29, 2018, 4:39 p.m.
Before this commit we had private _package member in TaskBase.
Create public property exposing it.

Signed-off-by: Tomasz Meresiński <tomasz.meresinski@comarch.com>
---
 lib/bb/build.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/lib/bb/build.py b/lib/bb/build.py
index 3e2a94ed..d1eaf4da 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -104,10 +104,17 @@  class TaskBase(event.Event):
     def setTask(self, task):
         self._task = task
 
+    def getPackage(self):
+        return self._package
+
+    def setPackage(self, package):
+        self._package = package
+
     def getDisplayName(self):
         return bb.event.getName(self)[4:]
 
     task = property(getTask, setTask, None, "task property")
+    package = property(getPackage, setPackage, doc="package name of this task")
 
 class TaskStarted(TaskBase):
     """Task execution started"""
@@ -181,7 +188,7 @@  class LogTee(object):
 
 #
 # pythonexception allows the python exceptions generated to be raised
-# as the real exceptions (not FuncFailed) and without a backtrace at the 
+# as the real exceptions (not FuncFailed) and without a backtrace at the
 # origin of the failure.
 #
 def exec_func(func, d, dirs = None, pythonexception=False):