Patchwork [bitbake-devel,06/13] bitbake: build: add link to logfile for Task events

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

Comments

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

We add a pointer to the logfile for Task events, so
that we can trace that in the Bitbake database

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 bitbake/lib/bb/build.py | 1 +
 1 file changed, 1 insertion(+)
Richard Purdie - Sept. 10, 2013, 2:01 p.m.
On Mon, 2013-09-09 at 17:40 +0100, Alex DAMIAN wrote:
> From: Alexandru DAMIAN <alexandru.damian@intel.com>
> 
> We add a pointer to the logfile for Task events, so
> that we can trace that in the Bitbake database
> 
> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
> ---
>  bitbake/lib/bb/build.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
> index 1265bdc..4abbe48 100644
> --- a/bitbake/lib/bb/build.py
> +++ b/bitbake/lib/bb/build.py
> @@ -73,6 +73,7 @@ class TaskBase(event.Event):
>          self._task = t
>          self._package = d.getVar("PF", True)
>          self._file = d.getVar("FILE", True)
> +        self.logfile = d.getVar("BB_LOGFILE", True)
>          self.taskfile = self._file
>          self.taskname = self._task
>          event.Event.__init__(self)

This leaves the TaskFailed() events still manually passing in logfile as
a separate parameter. I think we might as well adjust the code to always
pass the logfile to the events instead of this, mainly as it makes it
explictly clear where and when the logfile is uses. BB_LOGFILE is really
meant more for external usage than for bitbake itself.

Cheers,

Richard

Patch

diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 1265bdc..4abbe48 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -73,6 +73,7 @@  class TaskBase(event.Event):
         self._task = t
         self._package = d.getVar("PF", True)
         self._file = d.getVar("FILE", True)
+        self.logfile = d.getVar("BB_LOGFILE", True)
         self.taskfile = self._file
         self.taskname = self._task
         event.Event.__init__(self)