summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-29 22:57:11 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-02 09:55:47 +0100
commitee51cbec149415a014d5efd08f69c605e1c26a5f (patch)
tree4571191ff9b72a6c65cace652f95d39d57809751 /bitbake
parent09ba020015468f75c64cecc4b75e2bcf74978802 (diff)
downloadpoky-ee51cbec149415a014d5efd08f69c605e1c26a5f.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: cf864cd84172f605b0e1777c3defc000fa3a7379) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fc58ad84a9deb2620ad90611684dad65dafedb11) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> 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