From: git@git.openembedded.org
To: bitbake-devel@lists.openembedded.org
Subject: Paul Eggleton : bitbake/fetch2: reduce output for fetch failures
Date: Sun, 15 Jan 2012 10:15:11 +0000 (UTC) [thread overview]
Message-ID: <20120115101511.2EE5D10338@opal> (raw)
Module: bitbake.git
Branch: master
Commit: 6bbdc7d259c0cc041b62dbdb26cfc3ec6edcb6f3
URL: http://git.openembedded.org/?p=bitbake.git&a=commit;h=6bbdc7d259c0cc041b62dbdb26cfc3ec6edcb6f3
Author: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Fri Jan 13 17:01:50 2012 +0000
bitbake/fetch2: reduce output for fetch failures
Make the warning for the initial fetch failure a single line - we don't
need the full command and output here yet, but write it into the log in
full as a debug message. However, if fetching from mirrors fails as well
then print out the full details for the first error that occurred as an
ERROR rather than a WARNING.
Since this is logged as an ERROR, combined with an earlier patch it
suppresses the full log which does make the output much more readable
for any fetch error.
Fixes [YOCTO #1832].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
lib/bb/fetch2/__init__.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 771f72e..fe4f4b1 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -965,6 +965,7 @@ class Fetch(object):
if premirroronly:
self.d.setVar("BB_NO_NETWORK", "1")
+ firsterr = None
if not localpath and m.need_update(u, ud, self.d):
try:
logger.debug(1, "Trying Upstream")
@@ -980,7 +981,9 @@ class Fetch(object):
raise
except BBFetchException as e:
- logger.warn(str(e))
+ logger.warn('Failed to fetch URL %s' % u)
+ logger.debug(1, str(e))
+ firsterr = e
# Remove any incomplete fetch
if os.path.isfile(ud.localpath):
bb.utils.remove(ud.localpath)
@@ -989,6 +992,8 @@ class Fetch(object):
localpath = try_mirrors (self.d, ud, mirrors)
if not localpath or ((not os.path.exists(localpath)) and localpath.find("*") == -1):
+ if firsterr:
+ logger.error(str(firsterr))
raise FetchError("Unable to fetch URL from any source.", u)
update_stamp(u, ud, self.d)
reply other threads:[~2012-01-15 10:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120115101511.2EE5D10338@opal \
--to=git@git.openembedded.org \
--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