[bitbake-devel] [PATCH 4/8] bitbake: cooker: don't preserve BB_CONSOLELOG

Richard Purdie richard.purdie at linuxfoundation.org
Mon Feb 5 09:39:34 UTC 2018


On Thu, 2018-02-01 at 23:15 +0800, Robert Yang wrote:
> Fixed:
> $ bitbake --server-only -T -1
> Set MACHINE = "qemux86" in conf/local.conf
> $ bitbake quilt
> Set MACHINE = "qemuppc" in conf/local.conf
> $ bitbake quilt
> 
> The log still goes into tmp/log/cooker/qemux86 in the second run,
> this is
> incorrect (should be tmp/log/cooker/qemuppc). I checked the code, the
> ui
> initializes it every time when it starts, so let it use the up-to-
> date
> one rather than old one.
> 
> Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
> ---
>  bitbake/lib/bb/cooker.py | 8 --------
>  1 file changed, 8 deletions(-)

This effectively reverts:

http://git.yoctoproject.org/cgit.cgi/poky/commit/bitbake/lib/bb/cooker.py?id=3ebf7617d6c869f798807792918e1030b3ab66de

Sadly I didn't put a bug number in that commit message but I do
remember there being a good reason to do this.

I think the problem is a "UI" can run multiple commands with reset
events within that command stream and it would only have one console
log. I also believe there may have been issues where toaster would have
been unable to find the logs if they kept moving around.

The console log handling probably needs more thought as there are
clearly multiple issues here. We may want to move it out of a directory
which is machine specific?

Cheers,

Richard

> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index af482f9..3f113ae 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -326,11 +326,6 @@ class BBCooker:
>          self.state = state.initial
>          self.caches_array = []
>  
> -        # Need to preserve BB_CONSOLELOG over resets
> -        consolelog = None
> -        if hasattr(self, "data"):
> -            consolelog = self.data.getVar("BB_CONSOLELOG")
> -
>          if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
>              self.enableDataTracking()
>  
> @@ -358,9 +353,6 @@ class BBCooker:
>          self.data_hash = self.databuilder.data_hash
>          self.extraconfigdata = {}
>  
> -        if consolelog:
> -            self.data.setVar("BB_CONSOLELOG", consolelog)
> -
>          self.data.setVar('BB_CMDLINE', self.ui_cmdline)
>  
>          #
> -- 
> 2.7.4
> 



More information about the bitbake-devel mailing list