@@ -36,12 +36,13 @@ if __name__ == "__main__":
print("--flag only makes sense with --value")
sys.exit(1)
- with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not args.quiet) as tinfoil:
+ quiet = args.quiet
+ with bb.tinfoil.Tinfoil(tracking=True) as tinfoil:
if args.recipe:
- tinfoil.prepare(quiet=2)
+ tinfoil.prepare(quiet=3 if quiet else 2)
d = tinfoil.parse_recipe(args.recipe)
else:
- tinfoil.prepare(quiet=2, config_only=True)
+ tinfoil.prepare(quiet=3 if quiet else 2, config_only=True)
d = tinfoil.config_data
if args.flag:
print(str(d.getVarFlag(args.variable, args.flag, expand=(not args.unexpand))))
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> --- PATCHv2: New in this patch set. bitbake/bin/bitbake-getvar | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)