[bitbake-devel] [WIP][RFC PATCH 2/5] bitbake: main: add log handler when status-only

Robert Yang liezhi.yang at windriver.com
Tue Aug 8 14:33:14 UTC 2017



On 08/08/2017 08:14 PM, Richard Purdie wrote:
> On Tue, 2017-08-08 at 02:12 -0700, Robert Yang wrote:
>> The ui is not a must for logger, and use logger when status-only is
>> very good
>> for debugging.
>>
>> e.g.:
>> $ bitbake --status
>> NOTE: bitbake server is not running.
>>
>> $ bitbake --server-only -B localhost:-1
>> $ bitbake --status
>> NOTE: Reconnecting to bitbake server...
>>
>> Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
>> ---
>>  bitbake/lib/bb/main.py | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
>> index 62f9e1eacf1..fb082e7e0f3 100755
>> --- a/bitbake/lib/bb/main.py
>> +++ b/bitbake/lib/bb/main.py
>> @@ -397,9 +397,7 @@ def bitbake_main(configParams, configuration):
>>  def setup_bitbake(configParams, configuration, extrafeatures=None,
>> setup_logging=True):
>>      # Ensure logging messages get sent to the UI as events
>>      handler = bb.event.LogHandler()
>> -    if setup_logging and not configParams.status_only:
>> -        # In status only mode there are no logs and no UI
>> -        logger.addHandler(handler)
>> +    logger.addHandler(handler)
>>
>>      # Clear away any spurious environment variables while we stoke
>> up the cooker
>>      cleanedvars = bb.utils.clean_environment()
>
> The patch doesn't seem to apply, there is no setup_logging parameter on
> master?

Sorry, it does on master branch, but not no master-next. I will rebase it
to master-next.

// Robert



>
> Cheers,
>
> Richard
>



More information about the bitbake-devel mailing list