]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake/runqueue: show correct task name for setscene task failure
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 28 Feb 2011 14:28:25 +0000 (14:28 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Jun 2011 10:48:04 +0000 (11:48 +0100)
If a setscene task failed previously it was showing an incorrect task
name in the error line. This patch ensures we show the correct name, also
including the "_setscene" suffix.

(From Poky rev: 9d9c68e3536387150e3ce7261f4770576e724dd9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/runqueue.py

index fab17b1501b05b88ac4d04d407bd8523e0853a95..1483bda42db5e5f688afc081290a95181e8206e4 100644 (file)
@@ -204,9 +204,9 @@ class RunQueueData:
             ret.extend([nam])
         return ret
 
-    def get_user_idstring(self, task):
+    def get_user_idstring(self, task, task_name_suffix = ""):
         fn = self.taskData.fn_index[self.runq_fnid[task]]
-        taskname = self.runq_task[task]
+        taskname = self.runq_task[task] + task_name_suffix
         return "%s, %s" % (fn, taskname)
 
     def get_task_id(self, fnid, taskname):
@@ -1503,7 +1503,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
     def task_fail(self, task, result):
         self.stats.taskFailed()
         index = self.rqdata.runq_setscene[task]
-        bb.event.fire(runQueueTaskFailed(task, self.stats, result, self), self.cfgData)
+        bb.event.fire(sceneQueueTaskFailed(index, self.stats, result, self), self.cfgData)
         self.scenequeue_notcovered.add(task)
         self.scenequeue_updatecounters(task)
 
@@ -1633,6 +1633,14 @@ class runQueueTaskFailed(runQueueEvent):
         runQueueEvent.__init__(self, task, stats, rq)
         self.exitcode = exitcode
 
+class sceneQueueTaskFailed(runQueueTaskFailed):
+    """
+    Event notifing a setscene task failed
+    """
+    def __init__(self, task, stats, exitcode, rq):
+        runQueueTaskFailed.__init__(self, task, stats, exitcode, rq)
+        self.taskstring = rq.rqdata.get_user_idstring(task, "_setscene")
+
 class runQueueTaskCompleted(runQueueEvent):
     """
     Event notifing a task completed