($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Viswanath Kraleti <quic_vkraleti@quicinc.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: [PATCH 2/2] fetch2: Fix misleading "no output" msg
Date: Fri, 8 Mar 2024 19:03:32 +0530	[thread overview]
Message-ID: <20240308133332.2213250-2-quic_vkraleti@quicinc.com> (raw)
In-Reply-To: <20240308133332.2213250-1-quic_vkraleti@quicinc.com>

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>
---
 lib/bb/fetch2/__init__.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 3529531c..fed36a32 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)
-- 
2.25.1



      reply	other threads:[~2024-03-08 13:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 13:33 [PATCH 1/2] fetch2/git: Add verbose logging support Viswanath Kraleti
2024-03-08 13:33 ` Viswanath Kraleti [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240308133332.2213250-2-quic_vkraleti@quicinc.com \
    --to=quic_vkraleti@quicinc.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).