summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-01-13 17:01:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-15 10:06:22 +0000
commit5f5ae14ee398d1e1a3b17749dff929ae4a48dcdf (patch)
tree5ca9cbf521c810e00c001164bb2b0fd85cd2d69f /bitbake
parenteb6291b36fd9206aec0476852042a18113039317 (diff)
downloadpoky-5f5ae14ee398d1e1a3b17749dff929ae4a48dcdf.tar.gz
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]. (Bitbake rev: 6bbdc7d259c0cc041b62dbdb26cfc3ec6edcb6f3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 771f72e4ae..fe4f4b1d60 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -965,6 +965,7 @@ class Fetch(object):
965 if premirroronly: 965 if premirroronly:
966 self.d.setVar("BB_NO_NETWORK", "1") 966 self.d.setVar("BB_NO_NETWORK", "1")
967 967
968 firsterr = None
968 if not localpath and m.need_update(u, ud, self.d): 969 if not localpath and m.need_update(u, ud, self.d):
969 try: 970 try:
970 logger.debug(1, "Trying Upstream") 971 logger.debug(1, "Trying Upstream")
@@ -980,7 +981,9 @@ class Fetch(object):
980 raise 981 raise
981 982
982 except BBFetchException as e: 983 except BBFetchException as e:
983 logger.warn(str(e)) 984 logger.warn('Failed to fetch URL %s' % u)
985 logger.debug(1, str(e))
986 firsterr = e
984 # Remove any incomplete fetch 987 # Remove any incomplete fetch
985 if os.path.isfile(ud.localpath): 988 if os.path.isfile(ud.localpath):
986 bb.utils.remove(ud.localpath) 989 bb.utils.remove(ud.localpath)
@@ -989,6 +992,8 @@ class Fetch(object):
989 localpath = try_mirrors (self.d, ud, mirrors) 992 localpath = try_mirrors (self.d, ud, mirrors)
990 993
991 if not localpath or ((not os.path.exists(localpath)) and localpath.find("*") == -1): 994 if not localpath or ((not os.path.exists(localpath)) and localpath.find("*") == -1):
995 if firsterr:
996 logger.error(str(firsterr))
992 raise FetchError("Unable to fetch URL from any source.", u) 997 raise FetchError("Unable to fetch URL from any source.", u)
993 998
994 update_stamp(u, ud, self.d) 999 update_stamp(u, ud, self.d)