All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build: Avoid duplicating logs in verbose mode
@ 2021-09-10  9:29 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2021-09-10  9:29 UTC (permalink / raw)
  To: bitbake-devel

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>
---
 lib/bb/build.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/bb/build.py b/lib/bb/build.py
index 9862e8878e..1e062adb51 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
-- 
2.32.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-10  9:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10  9:29 [PATCH] build: Avoid duplicating logs in verbose mode Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.