summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-24 12:28:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-25 18:14:53 +0100
commit4c94d36022727fa5b640b73b3f2bc82a58443a33 (patch)
tree58e5367bdc2a8c1dbf89789705d6f7b7aced0831 /bitbake/lib/bb/build.py
parentb221b8a657888be605f6c31e6353b10b08a619e6 (diff)
downloadpoky-4c94d36022727fa5b640b73b3f2bc82a58443a33.tar.gz
bitbake: build/msg: Cleanup verbose option handling
The levels of indirection to set these verbose logging options is rather crazy. This attempts to turn things into two specific options with much more specific meanings. For now its all still controlled by the commandline verbose option and should funciton as previously, with the addition that the BB_VERBOSE_LOGS option can now be task specific. (Bitbake rev: 423c046f2173aaff3072dc3d0882d01b8a0b0212) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r--bitbake/lib/bb/build.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 94f9cb371c..974d2ff065 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -29,6 +29,9 @@ from bb import data, event, utils
29bblogger = logging.getLogger('BitBake') 29bblogger = logging.getLogger('BitBake')
30logger = logging.getLogger('BitBake.Build') 30logger = logging.getLogger('BitBake.Build')
31 31
32verboseShellLogging = False
33verboseStdoutLogging = False
34
32__mtime_cache = {} 35__mtime_cache = {}
33 36
34def cached_mtime_noerror(f): 37def cached_mtime_noerror(f):
@@ -413,7 +416,7 @@ def exec_func_shell(func, d, runfile, cwd=None):
413 416
414 bb.data.emit_func(func, script, d) 417 bb.data.emit_func(func, script, d)
415 418
416 if bb.msg.loggerVerboseLogs: 419 if verboseShellLogging or bb.utils.to_boolean(d.getVar("BB_VERBOSE_LOGS", False)):
417 script.write("set -x\n") 420 script.write("set -x\n")
418 if cwd: 421 if cwd:
419 script.write("cd '%s'\n" % cwd) 422 script.write("cd '%s'\n" % cwd)
@@ -433,7 +436,7 @@ exit $ret
433 if fakerootcmd: 436 if fakerootcmd:
434 cmd = [fakerootcmd, runfile] 437 cmd = [fakerootcmd, runfile]
435 438
436 if bb.msg.loggerDefaultVerbose: 439 if verboseStdoutLogging:
437 logfile = LogTee(logger, StdoutNoopContextManager()) 440 logfile = LogTee(logger, StdoutNoopContextManager())
438 else: 441 else:
439 logfile = StdoutNoopContextManager() 442 logfile = StdoutNoopContextManager()