From 0e8c6cad0800f6c3f5ab1743a77e014be3c7e297 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 10 Sep 2021 10:13:06 +0100 Subject: 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 (cherry picked from commit fc58ad84a9deb2620ad90611684dad65dafedb11) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- bitbake/lib/bb/process.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bitbake') 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): stderr = stderr.decode("utf-8") if pipe.returncode != 0: + if log: + # Don't duplicate the output in the exception if logging it + raise ExecutionError(cmd, pipe.returncode, None, None) raise ExecutionError(cmd, pipe.returncode, stdout, stderr) return stdout, stderr -- cgit v1.2.3-54-g00ecf