diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-10 10:13:06 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-02 09:55:51 +0100 |
commit | 0e8c6cad0800f6c3f5ab1743a77e014be3c7e297 (patch) | |
tree | 681a2d47add5026c5facf3ea1c727587bf7653f3 /bitbake/lib/bb | |
parent | 55d4a252a8ce37c2282ba2d28363cfe7f56990dc (diff) | |
download | poky-0e8c6cad0800f6c3f5ab1743a77e014be3c7e297.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: f84a2f8d8bcc2fa4cd9ab6ef80ae638d0df47965)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit fc58ad84a9deb2620ad90611684dad65dafedb11)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/process.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/process.py b/bitbake/lib/bb/process.py index 2dc472a86f..24c588e533 100644 --- a/bitbake/lib/bb/process.py +++ b/bitbake/lib/bb/process.py | |||
@@ -179,5 +179,8 @@ def run(cmd, input=None, log=None, extrafiles=None, **options): | |||
179 | stderr = stderr.decode("utf-8") | 179 | stderr = stderr.decode("utf-8") |
180 | 180 | ||
181 | if pipe.returncode != 0: | 181 | if pipe.returncode != 0: |
182 | if log: | ||
183 | # Don't duplicate the output in the exception if logging it | ||
184 | raise ExecutionError(cmd, pipe.returncode, None, None) | ||
182 | raise ExecutionError(cmd, pipe.returncode, stdout, stderr) | 185 | raise ExecutionError(cmd, pipe.returncode, stdout, stderr) |
183 | return stdout, stderr | 186 | return stdout, stderr |