From 4de265915c0a82408778a66179df1ca95568d238 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 10 Sep 2021 10:28:18 +0100 Subject: bitbake: build: Avoid duplicating logs in verbose mode With "bitbake -v", for task failures you'd see the log output twice. Avoid this by using the existing "did we print info" switch. (Bitbake rev: 53d05a7b4a6380bd2bf8dd7bb0681e8c961bed5d) Signed-off-by: Richard Purdie (cherry picked from commit e2c1afda4cb8023ed4ffeb5dc5bee4f0055659a8) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- bitbake/lib/bb/build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 04971636fe..6e9c064e9d 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -592,6 +592,10 @@ def _exec_task(fn, task, d, quieterr): event.fire(TaskFailedSilent(task, fn, logfn, localdata), localdata) else: errprinted = errchk.triggered + # If the output is already on stdout, we've printed the information in the + # logs once already so don't duplicate + if verboseStdoutLogging: + errprinted = True logger.error(str(exc)) event.fire(TaskFailed(task, fn, logfn, localdata, errprinted), localdata) return 1 -- cgit v1.2.3-54-g00ecf