diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 8dd276fa72..70387f52db 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -35,6 +35,7 @@ import operator | |||
35 | import collections | 35 | import collections |
36 | import subprocess | 36 | import subprocess |
37 | import pickle | 37 | import pickle |
38 | import errno | ||
38 | import bb.persist_data, bb.utils | 39 | import bb.persist_data, bb.utils |
39 | import bb.checksum | 40 | import bb.checksum |
40 | from bb import data | 41 | from bb import data |
@@ -998,6 +999,12 @@ def try_mirror_url(fetch, origud, ud, ld, check = False): | |||
998 | except bb.fetch2.NetworkAccess: | 999 | except bb.fetch2.NetworkAccess: |
999 | raise | 1000 | raise |
1000 | 1001 | ||
1002 | except IOError as e: | ||
1003 | if e.errno in [os.errno.ESTALE]: | ||
1004 | logger.warn("Stale Error Observed %s." % ud.url) | ||
1005 | return False | ||
1006 | raise | ||
1007 | |||
1001 | except bb.fetch2.BBFetchException as e: | 1008 | except bb.fetch2.BBFetchException as e: |
1002 | if isinstance(e, ChecksumError): | 1009 | if isinstance(e, ChecksumError): |
1003 | logger.warning("Mirror checksum failure for url %s (original url: %s)\nCleaning and trying again." % (ud.url, origud.url)) | 1010 | logger.warning("Mirror checksum failure for url %s (original url: %s)\nCleaning and trying again." % (ud.url, origud.url)) |
@@ -1646,6 +1653,11 @@ class Fetch(object): | |||
1646 | 1653 | ||
1647 | update_stamp(ud, self.d) | 1654 | update_stamp(ud, self.d) |
1648 | 1655 | ||
1656 | except IOError as e: | ||
1657 | if e.errno in [os.errno.ESTALE]: | ||
1658 | logger.error("Stale Error Observed %s." % u) | ||
1659 | raise ChecksumError("Stale Error Detected") | ||
1660 | |||
1649 | except BBFetchException as e: | 1661 | except BBFetchException as e: |
1650 | if isinstance(e, ChecksumError): | 1662 | if isinstance(e, ChecksumError): |
1651 | logger.error("Checksum failure fetching %s" % u) | 1663 | logger.error("Checksum failure fetching %s" % u) |