* [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied
@ 2023-09-26 10:14 Qi.Chen
2023-09-26 10:14 ` [bitbake-devel][PATCH 2/2] tinfoil.py: avoid undefined variable error Qi.Chen
2023-09-26 11:27 ` [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied Richard Purdie
0 siblings, 2 replies; 4+ messages in thread
From: Qi.Chen @ 2023-09-26 10:14 UTC (permalink / raw)
To: bitbake-devel
From: Chen Qi <Qi.Chen@windriver.com>
When scripts rely on bitbake-getvar's output to get values, e.g.,
oe-find-native-sysroot, we need to ensure no warning message messes
things up.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
bin/bitbake-getvar | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bin/bitbake-getvar b/bin/bitbake-getvar
index 4a9eb4f31..6be194e42 100755
--- a/bin/bitbake-getvar
+++ b/bin/bitbake-getvar
@@ -37,11 +37,12 @@ if __name__ == "__main__":
sys.exit(1)
with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not args.quiet) as tinfoil:
+ quiet_level = 3 if args.quiet else 2
if args.recipe:
- tinfoil.prepare(quiet=2)
+ tinfoil.prepare(quiet=quiet_level)
d = tinfoil.parse_recipe(args.recipe)
else:
- tinfoil.prepare(quiet=2, config_only=True)
+ tinfoil.prepare(quiet=quiet_level, config_only=True)
d = tinfoil.config_data
if args.flag:
print(str(d.getVarFlag(args.variable, args.flag, expand=(not args.unexpand))))
--
2.40.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bitbake-devel][PATCH 2/2] tinfoil.py: avoid undefined variable error
2023-09-26 10:14 [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied Qi.Chen
@ 2023-09-26 10:14 ` Qi.Chen
2023-09-26 11:27 ` [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied Richard Purdie
1 sibling, 0 replies; 4+ messages in thread
From: Qi.Chen @ 2023-09-26 10:14 UTC (permalink / raw)
To: bitbake-devel
From: Chen Qi <Qi.Chen@windriver.com>
When setup_logging is False, self.localhandlers is not defined
yet will be possibly used in prepare.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
lib/bb/tinfoil.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py
index 91fbf1b13..8fed21dca 100644
--- a/lib/bb/tinfoil.py
+++ b/lib/bb/tinfoil.py
@@ -325,11 +325,11 @@ class Tinfoil:
self.recipes_parsed = False
self.quiet = 0
self.oldhandlers = self.logger.handlers[:]
+ self.localhandlers = []
if setup_logging:
# This is the *client-side* logger, nothing to do with
# logging messages from the server
bb.msg.logger_create('BitBake', output)
- self.localhandlers = []
for handler in self.logger.handlers:
if handler not in self.oldhandlers:
self.localhandlers.append(handler)
--
2.40.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied
2023-09-26 10:14 [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied Qi.Chen
2023-09-26 10:14 ` [bitbake-devel][PATCH 2/2] tinfoil.py: avoid undefined variable error Qi.Chen
@ 2023-09-26 11:27 ` Richard Purdie
2023-09-26 14:39 ` Chen, Qi
1 sibling, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2023-09-26 11:27 UTC (permalink / raw)
To: Qi.Chen, bitbake-devel
On Tue, 2023-09-26 at 03:14 -0700, Chen Qi via lists.openembedded.org
wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> When scripts rely on bitbake-getvar's output to get values, e.g.,
> oe-find-native-sysroot, we need to ensure no warning message messes
> things up.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> bin/bitbake-getvar | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
I think Peter already sent something along these lines which just
merged?
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied
2023-09-26 11:27 ` [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied Richard Purdie
@ 2023-09-26 14:39 ` Chen, Qi
0 siblings, 0 replies; 4+ messages in thread
From: Chen, Qi @ 2023-09-26 14:39 UTC (permalink / raw)
To: Richard Purdie, bitbake-devel
Yes, indeed.
Regards,
Qi
-----Original Message-----
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Sent: Tuesday, September 26, 2023 7:27 PM
To: Chen, Qi <Qi.Chen@windriver.com>; bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied
On Tue, 2023-09-26 at 03:14 -0700, Chen Qi via lists.openembedded.org
wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> When scripts rely on bitbake-getvar's output to get values, e.g.,
> oe-find-native-sysroot, we need to ensure no warning message messes
> things up.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> bin/bitbake-getvar | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
I think Peter already sent something along these lines which just merged?
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-26 14:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-26 10:14 [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied Qi.Chen
2023-09-26 10:14 ` [bitbake-devel][PATCH 2/2] tinfoil.py: avoid undefined variable error Qi.Chen
2023-09-26 11:27 ` [bitbake-devel][PATCH 1/2] bitbake-getvar: further supress warnings when quiet option is supplied Richard Purdie
2023-09-26 14:39 ` Chen, Qi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.