From: Alexandru DAMIAN Date: Wed, 18 Sep 2013 12:15:49 +0000 (+0100) Subject: bitbake: build, runqueue: adds info to the *runQueue* events X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4a5e4be50d871a80dbe0993117d73f5ad82e38f;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: build, runqueue: adds info to the *runQueue* events This patch adds task identifying information for all runQueue and sceneQueue events, and for bb.build.Task* events. This will allow matching event to specific tasks in the UI handlers processing these events. Adds RunQueueData functions to get the task name and task file for usage with the runQueue* events. Adds taskfile and taskname properties to bb.build.TaskBase. Adds taskfile and taskname properties to the *runQueue* events Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- diff --git a/lib/bb/build.py b/lib/bb/build.py index 7ee500773d1..8aec699e79a 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -72,6 +72,8 @@ class TaskBase(event.Event): def __init__(self, t, logfile, d): self._task = t self._package = d.getVar("PF", True) + self.taskfile = d.getVar("FILE", True) + self.taskname = self._task self.logfile = logfile event.Event.__init__(self) self._message = "recipe %s: task %s: %s" % (d.getVar("PF", True), t, self.getDisplayName()) diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 472509fa108..19e89e96926 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -217,6 +217,12 @@ class RunQueueData: ret.extend([nam]) return ret + def get_task_name(self, task): + return self.runq_task[task] + + def get_task_file(self, task): + return self.taskData.fn_index[self.runq_fnid[task]] + def get_user_idstring(self, task, task_name_suffix = ""): fn = self.taskData.fn_index[self.runq_fnid[task]] taskname = self.runq_task[task] + task_name_suffix @@ -1786,6 +1792,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.taskfile = rq.rqdata.get_task_file(task) self.stats = stats.copy() bb.event.Event.__init__(self) @@ -1797,6 +1805,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.taskfile = rq.rqdata.get_task_file(realtask) class runQueueTaskStarted(runQueueEvent): """