aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-10 10:28:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-11 22:39:15 +0100
commite2c1afda4cb8023ed4ffeb5dc5bee4f0055659a8 (patch)
tree39689516dac50e4ad5cdf253693896830a0b831a
parentfc58ad84a9deb2620ad90611684dad65dafedb11 (diff)
downloadbitbake-e2c1afda4cb8023ed4ffeb5dc5bee4f0055659a8.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/build.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 9862e8878..1e062adb5 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -699,6 +699,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