summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2017-06-14 20:30:22 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-22 09:23:39 +0100
commit20565a96934a0de2ede7ca419020c0c29725aaea (patch)
treee4afa2e7d7bafddf2cf8648c1aee9181a09d578d /bitbake/lib/bb/fetch2
parentb367cd91d1f12e9eca92224dc5ce6b2da028c106 (diff)
downloadpoky-20565a96934a0de2ede7ca419020c0c29725aaea.tar.gz
bitbake: fetch: fix handling of files with incorrect checksums from a premirror
Ensure that when an item fetched from a premirror has an invalid checksum the fetcher falls back to the usual logic of trying the upstream and any configured mirrors. (Bitbake rev: 022adb30dbb0df764c9fb515918cb9a88e4f8d6f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 1f63a045c1..ec65216fef 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1621,6 +1621,15 @@ class Fetch(object):
1621 logger.debug(1, "Trying PREMIRRORS") 1621 logger.debug(1, "Trying PREMIRRORS")
1622 mirrors = mirror_from_string(self.d.getVar('PREMIRRORS')) 1622 mirrors = mirror_from_string(self.d.getVar('PREMIRRORS'))
1623 localpath = try_mirrors(self, self.d, ud, mirrors, False) 1623 localpath = try_mirrors(self, self.d, ud, mirrors, False)
1624 if localpath:
1625 try:
1626 # early checksum verification so that if the checksum of the premirror
1627 # contents mismatch the fetcher can still try upstream and mirrors
1628 update_stamp(ud, self.d)
1629 except ChecksumError as e:
1630 logger.warning("Checksum failure encountered with premirror download of %s - will attempt other sources." % u)
1631 logger.debug(1, str(e))
1632 localpath = ""
1624 1633
1625 if premirroronly: 1634 if premirroronly:
1626 self.d.setVar("BB_NO_NETWORK", "1") 1635 self.d.setVar("BB_NO_NETWORK", "1")