[bitbake-devel] [PATCH 04/13] bitbake: runqueue, build: event data change

Richard Purdie richard.purdie at linuxfoundation.org
Tue Sep 10 13:52:12 UTC 2013


On Mon, 2013-09-09 at 17:40 +0100, Alex DAMIAN wrote:
> From: Alexandru DAMIAN <alexandru.damian at intel.com>
> 
> We modify event data to make sure we can match build events
> with runqueue events. This is important because the build
> events supply datastore-evaluated data while runqueue events supply
> bitbake-related data. We get the recipe name and version from
> the datastore, while the file paths and timing information are
> collected from the RunQueue.
> 
> We modify filling-in the information side to take advantage of the
> new info supplied.
> 
> Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
> ---
>  bitbake/lib/bb/build.py    | 3 +++
>  bitbake/lib/bb/runqueue.py | 8 ++++----
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
> index a53aba9..1265bdc 100644
> --- a/bitbake/lib/bb/build.py
> +++ b/bitbake/lib/bb/build.py
> @@ -72,6 +72,9 @@ class TaskBase(event.Event):
>      def __init__(self, t, d ):
>          self._task = t
>          self._package = d.getVar("PF", True)
> +        self._file = d.getVar("FILE", True)
> +        self.taskfile = self._file
> +        self.taskname = self._task
>          event.Event.__init__(self)
>          self._message = "recipe %s: task %s: %s" % (d.getVar("PF", True), t, self.getDisplayName())
>  
> diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
> index 002bf76..73dd059 100644
> --- a/bitbake/lib/bb/runqueue.py
> +++ b/bitbake/lib/bb/runqueue.py
> @@ -220,7 +220,7 @@ class RunQueueData:
>      def get_task_name(self, task):
>          return self.runq_task[task]
>  
> -    def get_task_package(self, 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 = ""):
> @@ -1787,7 +1787,7 @@ class runQueueEvent(bb.event.Event):
>          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.taskfile = rq.rqdata.get_task_file(task)
>          self.stats = stats.copy()
>          bb.event.Event.__init__(self)
>  
> @@ -1800,7 +1800,7 @@ class sceneQueueEvent(runQueueEvent):
>          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)
> +        self.taskfile = rq.rqdata.get_task_file(realtask)
>  
>  class runQueueTaskStarted(runQueueEvent):
>      """
> @@ -1845,7 +1845,7 @@ class runQueueTaskSkipped(runQueueEvent):
>      """
>      def __init__(self, task, stats, rq, skip_reason):
>          runQueueEvent.__init__(self, task, stats, rq)
> -        self._package = rq.rqdata.get_task_package(task)
> +        self._file = rq.rqdata.get_task_file(task)
>          self._task = rq.rqdata.get_task_name(task)
>          self._skip = skip_reason
>  

You added get_task_package() in 2/13, added calls to in 3/13, now we're
getting rid of it. Is there not some way to clean up these patches so we
just add the right things? Is get_task_package() still needed? Reviewing
patches where things get added then removed again is rather confusing...

Cheers,

Richard






More information about the bitbake-devel mailing list