summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2023-09-25 04:18:32 +0200
committerSteve Sakoman <steve@sakoman.com>2023-11-09 04:41:17 -1000
commit0207478c7b071d027672e109e305b6c43637fa6a (patch)
treef698c7eec9e2cd35f36a7ea9aff3f7be9af9edde /bitbake
parentd8d6d921fad14b82167d9f031d4fca06b5e01883 (diff)
downloadpoky-0207478c7b071d027672e109e305b6c43637fa6a.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: 161ab0d5bab74732e12d490cee50e14295be0a9f) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 71ee69a20f21f3d37f4f060a7d8e87d9f1dc6aa1) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/bin/bitbake-getvar5
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)