Patchwork [bitbake-devel,03/13] bitbake: runqueue: added prebuild detailed information

login
register
mail settings
Submitter Alexandru DAMIAN
Date Sept. 9, 2013, 4:40 p.m.
Message ID <838cce5be7f3e4c5e0ddb941a742bfa733e8bb8b.1378743829.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/57687/
State New
Headers show

Comments

Alexandru DAMIAN - Sept. 9, 2013, 4:40 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

Adds why the prebuild tasks were skipped,
as to distinguish about covered/existing tasks.

Adds task name and task package to all runQueue
and sceneQueue events.
---
 bitbake/lib/bb/runqueue.py | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

Patch

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index f084407..002bf76 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1331,10 +1331,10 @@  class RunQueueExecuteTasks(RunQueueExecute):
         if self.rqdata.taskData.abort:
             self.rq.state = runQueueCleanUp
 
-    def task_skip(self, task):
+    def task_skip(self, task, skip_reason = ""):
         self.runq_running[task] = 1
         self.runq_buildable[task] = 1
-        bb.event.fire(runQueueTaskSkipped(task, self.stats, self.rq), self.cfgData)
+        bb.event.fire(runQueueTaskSkipped(task, self.stats, self.rq, skip_reason), self.cfgData)
         self.task_completeoutright(task)
         self.stats.taskCompleted()
         self.stats.taskSkipped()
@@ -1359,13 +1359,13 @@  class RunQueueExecuteTasks(RunQueueExecute):
             if task in self.rq.scenequeue_covered:
                 logger.debug(2, "Setscene covered task %s (%s)", task,
                                 self.rqdata.get_user_idstring(task))
-                self.task_skip(task)
+                self.task_skip(task, "covered")
                 return True
 
             if self.rq.check_stamp_task(task, taskname, cache=self.stampcache):
                 logger.debug(2, "Stamp current task %s (%s)", task,
                                 self.rqdata.get_user_idstring(task))
-                self.task_skip(task)
+                self.task_skip(task, "existing")
                 return True
 
             taskdep = self.rqdata.dataCache.task_deps[fn]
@@ -1786,6 +1786,8 @@  class runQueueEvent(bb.event.Event):
     def __init__(self, task, stats, rq):
         self.taskid = task
         self.taskstring = rq.rqdata.get_user_idstring(task)
+        self.taskname = rq.rqdata.get_task_name(task)
+        self.taskpackage = rq.rqdata.get_task_package(task)
         self.stats = stats.copy()
         bb.event.Event.__init__(self)
 
@@ -1797,6 +1799,8 @@  class sceneQueueEvent(runQueueEvent):
         runQueueEvent.__init__(self, task, stats, rq)
         realtask = rq.rqdata.runq_setscene[task]
         self.taskstring = rq.rqdata.get_user_idstring(realtask, "_setscene")
+        self.taskname = rq.rqdata.get_task_name(realtask) + "_setscene"
+        self.taskpackage = rq.rqdata.get_task_package(realtask)
 
 class runQueueTaskStarted(runQueueEvent):
     """
@@ -1839,10 +1843,11 @@  class runQueueTaskSkipped(runQueueEvent):
     """
     Event notifing a task was skipped
     """
-    def __init__(self, task, stats, rq):
+    def __init__(self, task, stats, rq, skip_reason):
         runQueueEvent.__init__(self, task, stats, rq)
         self._package = rq.rqdata.get_task_package(task)
         self._task = rq.rqdata.get_task_name(task)
+        self._skip = skip_reason
 
 class runQueuePipe():
     """