Bug 11772

Summary: [PATCH] event: temporarily disable verbose logs
Product: [Build System, Metadata & Runtime] BitBake Reporter: Enrico Scholz <enrico.scholz>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher
Version: 2.5   
Target Milestone: 4.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
patch none

Description Enrico Scholz 2017-07-07 12:28:34 UTC
Created attachment 3860 [details]
patch

Because stderr of event handlers is directly printed to the console,
this will pollute output when using e.g. 'buildhistory' which calls a
shell function.

This can be reproduced/demonstrated e.g. by setting

  BB_VERBOSE_LOGS = "1"
  INHERIT += "buildhistory"

Patch disables 'set -x' temporarily while executing the event handler.
Comment 1 Richard Purdie 2021-11-03 13:06:05 UTC
Sorry this has taken so long to get back to, I do keep looking at it periodically and the world has changed a bit since the bug was opened.

I think part of the confusion was the two different behaviours of verbose logs previously. The bitbake -v option would have things appear on the console, BB_VERBOSE_LOGS would have things appear in the logfiles. I generally read the summary of the bug as the "-v" option and this meant I didn't really see the issue of the event shell output on the console when there was already so much output.

Since the bug is about BB_VERBOSE_LOGS, I think the issue was the event handler data appearing on the console when there wasn't anything else there?

The good news is that bitbake's logging has changed in the intervening time. The buildhistory event handler output now goes to the bitbake-cookerdaemon log file which I think is an appropriate interpretation of the option. The console remains clear.

Would you agree the patch is therefore now obsolete and not needed?
Comment 2 Richard Purdie 2021-11-11 17:17:28 UTC
No longer an issue as per Comment 1.