Skip to contentSkip to conversation

bitbake-getvar: Make --value imply --quiet

PATCH New Peter Kjellerstedt 1 participant 1 message Sep 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake-getvar: Make --value imply --quiet

It does not make any sense to get log output from bitbake-getvar when the --value option is used as the log output is sent to stdout and thus interferes with the output of the variable's value.

---
 bitbake/bin/bitbake-getvar | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
bitbake/bin/bitbake-getvar +2 -1
index 4a9eb4f311..1ec90065a9 100755
@@ -36,7 +36,8 @@ 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 or args.value
+    with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not quiet) as tinfoil:
         if args.recipe:
             tinfoil.prepare(quiet=2)
             d = tinfoil.parse_recipe(args.recipe)