diff options
| author | Joshua Lock <joshua.g.lock@intel.com> | 2017-06-14 20:30:22 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-27 13:45:24 +0100 |
| commit | 18341b9dc9a91300c703b2f92052aa04cad74267 (patch) | |
| tree | 0f48479620fbfdc5ec47e1de46a114396c9ad883 | |
| parent | 9074fb46bc2a6da92334df068dbcc8cf8efbb6dc (diff) | |
| download | poky-18341b9dc9a91300c703b2f92052aa04cad74267.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: cc52b9b12c60810142252b9cb5d4268e42371b8e)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 136fc29c16..b853da30bd 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
| @@ -1619,6 +1619,15 @@ class Fetch(object): | |||
| 1619 | logger.debug(1, "Trying PREMIRRORS") | 1619 | logger.debug(1, "Trying PREMIRRORS") |
| 1620 | mirrors = mirror_from_string(self.d.getVar('PREMIRRORS')) | 1620 | mirrors = mirror_from_string(self.d.getVar('PREMIRRORS')) |
| 1621 | localpath = try_mirrors(self, self.d, ud, mirrors, False) | 1621 | localpath = try_mirrors(self, self.d, ud, mirrors, False) |
| 1622 | if localpath: | ||
| 1623 | try: | ||
| 1624 | # early checksum verification so that if the checksum of the premirror | ||
| 1625 | # contents mismatch the fetcher can still try upstream and mirrors | ||
| 1626 | update_stamp(ud, self.d) | ||
| 1627 | except ChecksumError as e: | ||
| 1628 | logger.warning("Checksum failure encountered with premirror download of %s - will attempt other sources." % u) | ||
| 1629 | logger.debug(1, str(e)) | ||
| 1630 | localpath = "" | ||
| 1622 | 1631 | ||
| 1623 | if premirroronly: | 1632 | if premirroronly: |
| 1624 | self.d.setVar("BB_NO_NETWORK", "1") | 1633 | self.d.setVar("BB_NO_NETWORK", "1") |
