summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-06-30 22:32:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-18 13:12:30 +0100
commit129060f0b7125f6ac5bbdfcd5f683a3d8ca318c4 (patch)
tree5a1c6d6bfdc626b7fe6e3092a3739c2248038212 /bitbake
parentf69b95817681432d98f757cf9d93ac51fd57f716 (diff)
downloadpoky-129060f0b7125f6ac5bbdfcd5f683a3d8ca318c4.tar.gz
bitbake: fetch2/wget: attempt checkstatus again if it fails
Some services such as SourceForge seem to struggle to keep up under load, with the result that over half of the autobuilder checkuri runs fail with sourceforge.net "connection timed out". Attempt to mitigate this by re-attempting once the network operation on failure. (Bitbake rev: 54b1961551511948e0cbd2ac39f19b39b9cee568) (Bitbake rev: 0b48acbf0428975e67012877417b9f90d3e1778c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Hand applied Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 8bc9e93ca0..691942c9c2 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -104,7 +104,7 @@ class Wget(FetchMethod):
104 104
105 return True 105 return True
106 106
107 def checkstatus(self, fetch, ud, d): 107 def checkstatus(self, fetch, ud, d, try_again=True):
108 import urllib2, socket, httplib 108 import urllib2, socket, httplib
109 from urllib import addinfourl 109 from urllib import addinfourl
110 from bb.fetch2 import FetchConnectionCache 110 from bb.fetch2 import FetchConnectionCache
@@ -278,9 +278,13 @@ class Wget(FetchMethod):
278 r.get_method = lambda: "HEAD" 278 r.get_method = lambda: "HEAD"
279 opener.open(r) 279 opener.open(r)
280 except urllib2.URLError as e: 280 except urllib2.URLError as e:
281 # debug for now to avoid spamming the logs in e.g. remote sstate searches 281 if try_again:
282 logger.debug(2, "checkstatus() urlopen failed: %s" % e) 282 logger.debug(2, "checkstatus: trying again")
283 return False 283 return self.checkstatus(fetch, ud, d, False)
284 else:
285 # debug for now to avoid spamming the logs in e.g. remote sstate searches
286 logger.debug(2, "checkstatus() urlopen failed: %s" % e)
287 return False
284 return True 288 return True
285 289
286 def _parse_path(self, regex, s): 290 def _parse_path(self, regex, s):