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 <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Yoann Congal 2025-05-14 23:28:52 +02:00 committed by Richard Purdie
parent 9bc47d6a4d
commit 4ee5633889

View File

@ -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