Patchwork [bitbake-devel,3/3] bitbake/build: report TaskFailedSilent events as "Failed"

login
register
mail settings
Submitter Paul Eggleton
Date March 1, 2012, 2:57 p.m.
Message ID <f5b6668030bf41a2c49de845dcda3bf91d66eae0.1330613733.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/22543/
State New
Headers show

Comments

Paul Eggleton - March 1, 2012, 2:57 p.m.
The change for setscene events to fire a TaskFailedSilent event instead
of TaskFailed resulted in "FailedSilent" being reported in the task
finish note log entry, which is not really desirable, so change it back
to reporting "Failed" again.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/lib/bb/build.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

Patch

diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index e390bec..a9b40e7 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -72,7 +72,7 @@  class TaskBase(event.Event):
         self._task = t
         self._package = d.getVar("PF", 1)
         event.Event.__init__(self)
-        self._message = "package %s: task %s: %s" % (d.getVar("PF", 1), t, bb.event.getName(self)[4:])
+        self._message = "package %s: task %s: %s" % (d.getVar("PF", 1), t, self.getDisplayName())
 
     def getTask(self):
         return self._task
@@ -80,6 +80,9 @@  class TaskBase(event.Event):
     def setTask(self, task):
         self._task = task
 
+    def getDisplayName(self):
+        return bb.event.getName(self)[4:]
+
     task = property(getTask, setTask, None, "task property")
 
 class TaskStarted(TaskBase):
@@ -102,6 +105,10 @@  class TaskFailedSilent(TaskBase):
         self.logfile = logfile
         super(TaskFailedSilent, self).__init__(task, metadata)
 
+    def getDisplayName(self):
+        # Don't need to tell the user it was silent
+        return "Failed"
+
 class TaskInvalid(TaskBase):
 
     def __init__(self, task, metadata):