]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
Move the runq task start/failed messages to the UI
authorChris Larson <chris_larson@mentor.com>
Mon, 6 Dec 2010 21:58:55 +0000 (14:58 -0700)
committerChris Larson <chris_larson@mentor.com>
Mon, 13 Dec 2010 19:34:37 +0000 (12:34 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/runqueue.py
lib/bb/ui/knotty.py

index 635a7b1457a4796095807df37f8b07dd5d3b8119..bce4b1b2aae2ffc64f142825a2dffeb51c39ff01 100644 (file)
@@ -977,13 +977,8 @@ class RunQueueExecute:
         self.rq.state = runQueueComplete
         return
 
-
     def notify_task_started(self, task):
         bb.event.fire(runQueueTaskStarted(task, self.stats, self.rq), self.cfgData)
-        logger.info("Running task %d of %d (ID: %s, %s)", self.stats.completed + self.stats.active + self.stats.failed + 1,
-                                                          self.stats.total,
-                                                          task,
-                                                          self.rqdata.get_user_idstring(task))
 
     def notify_task_completed(self, task):
         bb.event.fire(runQueueTaskCompleted(task, self.stats, self.rq), self.cfgData)
@@ -1103,12 +1098,10 @@ class RunQueueExecuteTasks(RunQueueExecute):
         Called when a task has failed
         Updates the state engine with the failure
         """
-        logger.error("Task %s (%s) failed with exit code '%s'", task,
-                     self.rqdata.get_user_idstring(task), exitcode)
         self.stats.taskFailed()
         fnid = self.rqdata.runq_fnid[task]
         self.failed_fnids.append(fnid)
-        bb.event.fire(runQueueTaskFailed(task, self.stats, self.rq), self.cfgData)
+        bb.event.fire(runQueueTaskFailed(task, self.stats, exitcode, self.rq), self.cfgData)
         if self.rqdata.taskData.abort:
             self.rq.state = runQueueCleanUp
 
@@ -1219,8 +1212,9 @@ class runQueueTaskFailed(runQueueEvent):
     """
     Event notifing a task failed
     """
-    def __init__(self, task, stats, rq):
+    def __init__(self, task, stats, exitcode, rq):
         runQueueEvent.__init__(self, task, stats, rq)
+        self.exitcode = exitcode
         self.message = "Task %s failed (%s)" % (task, self.taskstring)
 
 class runQueueTaskCompleted(runQueueEvent):
index 8a7b2b760de175f0e18d542a0c24ee741323a97c..8a077df2e54b4b0141d5b8be22ab2be5968b541c 100644 (file)
@@ -189,6 +189,17 @@ def main(server, eventHandler):
                     logger.error("Nothing %sPROVIDES '%s'", r, event._item)
                 continue
 
+            if isinstance(event, bb.runqueue.runQueueTaskStarted):
+                logger.info("Running task %s of %s (ID: %s, %s)",
+                            event.stats.completed + event.stats.active + event.stats.failed + 1,
+                            event.stats.total, event.taskid, event.taskstring)
+                continue
+
+            if isinstance(event, bb.runqueue.runQueueTaskFailed):
+                logger.error("Task %s (%s) failed with exit code '%s'",
+                             event.taskid, event.taskstring, event.exitcode)
+                continue
+
             # ignore
             if isinstance(event, (bb.event.BuildBase,
                                   bb.event.StampUpdate,