diff options
| author | hongxu <hongxu.jia@eng.windriver.com> | 2025-06-12 02:32:06 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-16 22:23:18 +0100 |
| commit | 8bd8461212bba22e990901c0eeb04f25502b11b9 (patch) | |
| tree | cf128f567784a5a7c9fe7eb09db9ad731555c2c4 /bitbake | |
| parent | 32e44e286692b0aac10a3887a0231e8cd772f082 (diff) | |
| download | poky-8bd8461212bba22e990901c0eeb04f25502b11b9.tar.gz | |
bitbake: bitbake-getvar: skip info output of bitbake for quiet
Calling oe-debuginfod in a build failed:
...
$ oe-debuginfod
|Getting sysroot...
|Error: NOTE: Reconnecting to bitbake server...
|NOTE: Retrying server connection (#1)... (18:55:53.009687)
|path-to-build/tmp/work/x86_64-linux/elfutils-native/0.192/recipe-sysroot-native doesn't exist.
|Have you run 'bitbake elfutils-native -caddto_recipe_sysroot'?
...
The script oe-debuginfod calls bitbake-getvar to get sysroot, the
output of bitbake-getvar was mixed with info output of bitbake
...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)... (18:55:53.009687)
...
Set logger level to logging.WARNING to skip info output
for quiet
(Bitbake rev: 873c524e1a33846df8f34b7c87b298349277b3d5)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
| -rwxr-xr-x | bitbake/bin/bitbake-getvar | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake-getvar b/bitbake/bin/bitbake-getvar index 1719824d95..378fb13572 100755 --- a/bitbake/bin/bitbake-getvar +++ b/bitbake/bin/bitbake-getvar | |||
| @@ -10,6 +10,7 @@ import io | |||
| 10 | import os | 10 | import os |
| 11 | import sys | 11 | import sys |
| 12 | import warnings | 12 | import warnings |
| 13 | import logging | ||
| 13 | warnings.simplefilter("default") | 14 | warnings.simplefilter("default") |
| 14 | 15 | ||
| 15 | bindir = os.path.dirname(__file__) | 16 | bindir = os.path.dirname(__file__) |
| @@ -38,6 +39,10 @@ if __name__ == "__main__": | |||
| 38 | sys.exit("--flag only makes sense with --value") | 39 | sys.exit("--flag only makes sense with --value") |
| 39 | 40 | ||
| 40 | quiet = args.quiet or args.value | 41 | quiet = args.quiet or args.value |
| 42 | if quiet: | ||
| 43 | logger = logging.getLogger("BitBake") | ||
| 44 | logger.setLevel(logging.WARNING) | ||
| 45 | |||
| 41 | with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not quiet) as tinfoil: | 46 | with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not quiet) as tinfoil: |
| 42 | if args.recipe: | 47 | if args.recipe: |
| 43 | tinfoil.prepare(quiet=3 if quiet else 2) | 48 | tinfoil.prepare(quiet=3 if quiet else 2) |
