From 69c622b744d987b48f7dd805ead973ad90479e4e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 29 Sep 2021 22:57:12 +0800 Subject: 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 (cherry picked from commit e2c1afda4cb8023ed4ffeb5dc5bee4f0055659a8) Signed-off-by: Anuj Mittal Signed-off-by: Richard Purdie --- lib/bb/build.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/bb/build.py b/lib/bb/build.py index 24ce327c5..39e7dba02 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 -- cgit 1.2.3-korg