summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-10 10:13:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-11 22:39:19 +0100
commitba4a61e69cd4035b5cdaa6cdf6be538af5ddaabb (patch)
treed0fbb07f898b8f75556564592091fa62fa37b50e /bitbake
parentc2b40b0f6d062c5061b11b038fac3b7b1539c688 (diff)
downloadpoky-ba4a61e69cd4035b5cdaa6cdf6be538af5ddaabb.tar.gz
bitbake: process: Don't include logs in error message if piping them
If the caller is piping the logs, they likely don't want them in the error exception as well. This removes duplicate output from the build output allowing the UI level controls on whether to show logs to work correctly. (Bitbake rev: fc58ad84a9deb2620ad90611684dad65dafedb11) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/process.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/process.py b/bitbake/lib/bb/process.py
index 7c3995cce5..d5a1775fce 100644
--- a/bitbake/lib/bb/process.py
+++ b/bitbake/lib/bb/process.py
@@ -181,5 +181,8 @@ def run(cmd, input=None, log=None, extrafiles=None, **options):
181 stderr = stderr.decode("utf-8") 181 stderr = stderr.decode("utf-8")
182 182
183 if pipe.returncode != 0: 183 if pipe.returncode != 0:
184 if log:
185 # Don't duplicate the output in the exception if logging it
186 raise ExecutionError(cmd, pipe.returncode, None, None)
184 raise ExecutionError(cmd, pipe.returncode, stdout, stderr) 187 raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
185 return stdout, stderr 188 return stdout, stderr