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

Robert Yang liezhi.yang at windriver.com
Thu Feb 8 04:18:43 UTC 2018


Hi RP,

On 02/05/2018 05:39 PM, Richard Purdie wrote:
> 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.

I've found the bug:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=8411

I think that it has been fixed by:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=8373

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=a0791c19db7d5b33ce7a4e3614a574ad4a319a84

I've tried the following commands with my patch:
$ . /workspace1/lyang1/poky/bitbake/bin/toaster start noweb
$ MACHINE=qemuppc bitbake quilt-native

The log is tmp/log/cooker/qemuppc/build_20180208_120722.942.log

$ MACHINE=qemux86 bitbake quilt-native

The log is tmp/log/cooker/qemux86/build_20180208_121605.382.log

And the log contents are correct.

So I think that we don't need preserve BB_CONSOLELOG anymore.

// Robert

> 
> 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