[2.0][PATCH 0/3] Patch review
Please review this set of changes for 2.0/kirkstone and have comments back by end of day Friday, November 10
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6158
The following changes since commit 6c1ffa9091d0c53a100e8c8c15122d28642034bd:
SECURITY.md: add file (2023-10-24 12:50:43 +0100)
are available in the Git repository at:
https://git.openembedded.org/bitbake-contrib stable/2.0-nut
https://git.openembedded.org/bitbake-contrib/log/?h=stable/2.0-nut
Denys Dmytriyenko (1):
runqueue: convert deferral messages from bb.note to bb.debug
Peter Kjellerstedt (2):
bitbake-getvar: Make --quiet work with --recipe
tinfoil: Do not fail when logging is disabled and full config is used
bin/bitbake-getvar | 5 +++-- lib/bb/runqueue.py | 6 +++--- lib/bb/tinfoil.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-)
Signature · 1 line
2.34.1
[bitbake][kirkstone][2.0][PATCH 1/3] bitbake-getvar: Make --quiet work with --recipe
From: Peter Kjellerstedt <[email protected]>
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.
--- bin/bitbake-getvar | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
bin/bitbake-getvar +3 -2
@@ -36,9 +36,10 @@ 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, setup_logging=not quiet) 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)
Signature · 1 line
2.34.1
[bitbake][kirkstone][2.0][PATCH 3/3] runqueue: convert deferral messages from bb.note to bb.debug
In reply to Steve SakomanFrom: Denys Dmytriyenko <[email protected]>
Using multiconfig to target baremetal pieces of the system and building corresponding toolchains for them results in hundreds and hundreds of "Deferring %s after %s" and "Deferred task %s now buildable".
To clean up the output and to reduce risk of missing important warnings, convert these notice messages to debug messages.
--- lib/bb/runqueue.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
lib/bb/runqueue.py +3 -3
@@ -1980,12 +1980,12 @@ class RunQueueExecute: # Allow the next deferred task to run. Any other deferred tasks should be deferred after that task. # We shouldn't allow all to run at once as it is prone to races. if not found: - bb.note("Deferred task %s now buildable" % t) + bb.debug(1, "Deferred task %s now buildable" % t) del self.sq_deferred[t] update_scenequeue_data([t], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False) found = t else: - bb.note("Deferring %s after %s" % (t, found)) + bb.debug(1, "Deferring %s after %s" % (t, found)) self.sq_deferred[t] = found def task_complete(self, task):
@@ -2892,7 +2892,7 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq): sqdata.hashes[h] = tid else: sqrq.sq_deferred[tid] = sqdata.hashes[h] - bb.note("Deferring %s after %s" % (tid, sqdata.hashes[h])) + bb.debug(1, "Deferring %s after %s" % (tid, sqdata.hashes[h])) update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True)
Signature · 1 line
2.34.1
[bitbake][kirkstone][2.0][PATCH 2/3] tinfoil: Do not fail when logging is disabled and full config is used
In reply to Steve SakomanFrom: Peter Kjellerstedt <[email protected]>
If Tinfoil is initialized with setup_logging = False and Tinfoil.prepare() is called with config_only = False, then it fails because self.localhandlers is only initialized when setup_logging = True.
This is seen with, e.g., bitbake-getvar -q -r busybox MACHINE:
Traceback (most recent call last):
File ".../bitbake/bin/bitbake-getvar", line 41, in <module>
tinfoil.prepare(quiet=2)
File ".../bitbake/lib/bb/tinfoil.py", line 390, in prepare
for handler in self.localhandlers:AttributeError: 'Tinfoil' object has no attribute 'localhandlers'. Did you mean: 'oldhandlers'?
--- lib/bb/tinfoil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/tinfoil.py +1 -1
@@ -324,11 +324,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)
Signature · 1 line
2.34.1