diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2023-09-25 04:18:32 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-26 10:37:17 +0100 |
commit | 874e8bb159a5a2d4afd8f641e712b33fa6eff400 (patch) | |
tree | 4bd86428fb5c3ad1b83888042ebc4c8e48e41706 /bitbake | |
parent | c7f99d688cd62b9bdfb1724368b96200e98f0426 (diff) | |
download | poky-874e8bb159a5a2d4afd8f641e712b33fa6eff400.tar.gz |
bitbake: bitbake-getvar: Make --quiet work with --recipe
Initializing Tinfoil with setup_logging = False only has an effect when
recipe parsing is not needed. To make it work regardless of if --recipe
is used, manipulate the quiet parameter to Tinfoil.prepare() instead.
(Bitbake rev: 71ee69a20f21f3d37f4f060a7d8e87d9f1dc6aa1)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.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, 3 insertions, 2 deletions
diff --git a/bitbake/bin/bitbake-getvar b/bitbake/bin/bitbake-getvar index 4a9eb4f311..13a317e1d6 100755 --- a/bitbake/bin/bitbake-getvar +++ b/bitbake/bin/bitbake-getvar | |||
@@ -36,9 +36,10 @@ if __name__ == "__main__": | |||
36 | print("--flag only makes sense with --value") | 36 | print("--flag only makes sense with --value") |
37 | sys.exit(1) | 37 | sys.exit(1) |
38 | 38 | ||
39 | with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not args.quiet) as tinfoil: | 39 | quiet = args.quiet |
40 | with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not quiet) as tinfoil: | ||
40 | if args.recipe: | 41 | if args.recipe: |
41 | tinfoil.prepare(quiet=2) | 42 | tinfoil.prepare(quiet=3 if quiet else 2) |
42 | d = tinfoil.parse_recipe(args.recipe) | 43 | d = tinfoil.parse_recipe(args.recipe) |
43 | else: | 44 | else: |
44 | tinfoil.prepare(quiet=2, config_only=True) | 45 | tinfoil.prepare(quiet=2, config_only=True) |