From a2ce3f44e2513d2dc5a21464989114cf3ac94b47 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Mon, 16 Sep 2013 12:46:01 +0000 Subject: [PATCH] bitbake: runqueue: add runQueueTaskSkipped event Adding a runQueueTaskSkipped to notify that the tasks that are not run either because they are set-scened or they don't need an update (timestamp was ok). (Bitbake rev: cf4a0c7aa82090876ae652b611acfab3ce2688f7) Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 25f1ab5..6346c77 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -1325,9 +1325,10 @@ class RunQueueExecuteTasks(RunQueueExecute): if self.rqdata.taskData.abort: self.rq.state = runQueueCleanUp - def task_skip(self, task): + def task_skip(self, task, reason): self.runq_running[task] = 1 self.runq_buildable[task] = 1 + bb.event.fire(runQueueTaskSkipped(task, self.stats, self.rq, reason), self.cfgData) self.task_completeoutright(task) self.stats.taskCompleted() self.stats.taskSkipped() @@ -1352,13 +1353,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] @@ -1834,6 +1835,14 @@ class sceneQueueTaskCompleted(sceneQueueEvent): Event notifing a setscene task completed """ +class runQueueTaskSkipped(runQueueEvent): + """ + Event notifing a task was skipped + """ + def __init__(self, task, stats, rq, reason): + runQueueEvent.__init__(self, task, stats, rq) + self.reason = reason + class runQueuePipe(): """ Abstraction for a pipe between a worker thread and the server -- 2.7.4