aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorViswanath Kraleti <quic_vkraleti@quicinc.com>2024-03-08 05:33:56 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-21 12:39:25 +0000
commit944fe0a77932a5559e01ae6035c4bffa5185ea6a (patch)
treea7602db9215465eb8e83912673a4185a9665e572 /lib/bb
parenteac583bd4c46f3bb9661852cb6a1448f16147ff1 (diff)
downloadbitbake-944fe0a77932a5559e01ae6035c4bffa5185ea6a.tar.gz
fetch2: Fix misleading "no output" msg
When a command is run with a non-null log, errors are only output to the log and are not returned in the exception. In that case direct users to that logfile instead of telling the command had no output. Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/fetch2/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 37fed16e4..5bf2c4b8c 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -943,7 +943,10 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None, log=None, workdir=None):
elif e.stderr:
output = "output:\n%s" % e.stderr
else:
- output = "no output"
+ if log:
+ output = "see logfile for output"
+ else:
+ output = "no output"
error_message = "Fetch command %s failed with exit code %s, %s" % (e.command, e.exitcode, output)
except bb.process.CmdError as e:
error_message = "Fetch command %s could not be run:\n%s" % (e.command, e.msg)