From 4ee563388944ab999648acb2d44438b41e20bb6f Mon Sep 17 00:00:00 2001 From: Yoann Congal Date: Wed, 14 May 2025 23:28:52 +0200 Subject: [PATCH] bitbake: knotty: pass failed task logs through the log infrastructure By switching from print() to bb.plain() to print failing task logs, we allow them to be saved in BB_CONSOLELOG. Fixes [YOCTO #15798]: This allows AB reproducibility test to save the full log of the failing tasks and helps debugging. (Bitbake rev: d3b3ad32da7c7ebf61814fc807f8667a37aa149b) Signed-off-by: Yoann Congal Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/knotty.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 2fff1b3669..9a589a5c8e 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -353,7 +353,7 @@ def print_event_log(event, includelogs, loglines, termfilter): termfilter.clearFooter() bb.error("Logfile of failure stored in: %s" % logfile) if includelogs and not event.errprinted: - print("Log data follows:") + bb.plain("Log data follows:") f = open(logfile, "r") lines = [] while True: @@ -366,11 +366,11 @@ def print_event_log(event, includelogs, loglines, termfilter): if len(lines) > int(loglines): lines.pop(0) else: - print('| %s' % l) + bb.plain('| %s' % l) f.close() if lines: for line in lines: - print(line) + bb.plain(line) def _log_settings_from_server(server, observe_only): # Get values of variables which control our output