diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-24 12:28:27 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-02 09:55:51 +0100 |
| commit | 28f080629b5151ffaedc6ea493063eb8480c3664 (patch) | |
| tree | 034566476b18cb46212f175e6976bdcf72fa53ea /bitbake/lib/bb/build.py | |
| parent | 75c8a5f5666481854232778f046cb30473ea6dc9 (diff) | |
| download | poky-28f080629b5151ffaedc6ea493063eb8480c3664.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: b4117231bf070703b9375af4411bcd160e07fdae)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 423c046f2173aaff3072dc3d0882d01b8a0b0212)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/build.py')
| -rw-r--r-- | bitbake/lib/bb/build.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 17c70d0a61..aaada8a18b 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
| @@ -27,6 +27,9 @@ from bb import data, event, utils | |||
| 27 | bblogger = logging.getLogger('BitBake') | 27 | bblogger = logging.getLogger('BitBake') |
| 28 | logger = logging.getLogger('BitBake.Build') | 28 | logger = logging.getLogger('BitBake.Build') |
| 29 | 29 | ||
| 30 | verboseShellLogging = False | ||
| 31 | verboseStdoutLogging = False | ||
| 32 | |||
| 30 | __mtime_cache = {} | 33 | __mtime_cache = {} |
| 31 | 34 | ||
| 32 | def cached_mtime_noerror(f): | 35 | def cached_mtime_noerror(f): |
| @@ -371,7 +374,7 @@ def exec_func_shell(func, d, runfile, cwd=None): | |||
| 371 | 374 | ||
| 372 | bb.data.emit_func(func, script, d) | 375 | bb.data.emit_func(func, script, d) |
| 373 | 376 | ||
| 374 | if bb.msg.loggerVerboseLogs: | 377 | if verboseShellLogging or bb.utils.to_boolean(d.getVar("BB_VERBOSE_LOGS", False)): |
| 375 | script.write("set -x\n") | 378 | script.write("set -x\n") |
| 376 | if cwd: | 379 | if cwd: |
| 377 | script.write("cd '%s'\n" % cwd) | 380 | script.write("cd '%s'\n" % cwd) |
| @@ -391,7 +394,7 @@ exit $ret | |||
| 391 | if fakerootcmd: | 394 | if fakerootcmd: |
| 392 | cmd = [fakerootcmd, runfile] | 395 | cmd = [fakerootcmd, runfile] |
| 393 | 396 | ||
| 394 | if bb.msg.loggerDefaultVerbose: | 397 | if verboseStdoutLogging: |
| 395 | logfile = LogTee(logger, StdoutNoopContextManager()) | 398 | logfile = LogTee(logger, StdoutNoopContextManager()) |
| 396 | else: | 399 | else: |
| 397 | logfile = StdoutNoopContextManager() | 400 | logfile = StdoutNoopContextManager() |
