diff options
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 1acb0a4f8c..a713418317 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
| @@ -358,7 +358,7 @@ def verify_checksum(u, ud, d): | |||
| 358 | mismatch = True; | 358 | mismatch = True; |
| 359 | 359 | ||
| 360 | if mismatch: | 360 | if mismatch: |
| 361 | msg = msg + '\nYour checksums:\nSRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' % (ud.md5_name, md5data, ud.sha256_name, sha256data) | 361 | msg = msg + '\nIf this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:\nSRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"\nOtherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.\n' % (ud.md5_name, md5data, ud.sha256_name, sha256data) |
| 362 | 362 | ||
| 363 | if len(msg): | 363 | if len(msg): |
| 364 | raise ChecksumError('Checksum mismatch!%s' % msg, u) | 364 | raise ChecksumError('Checksum mismatch!%s' % msg, u) |
| @@ -1204,8 +1204,9 @@ class Fetch(object): | |||
| 1204 | 1204 | ||
| 1205 | except BBFetchException as e: | 1205 | except BBFetchException as e: |
| 1206 | if isinstance(e, ChecksumError): | 1206 | if isinstance(e, ChecksumError): |
| 1207 | logger.warn("Checksum error encountered with download (will attempt other sources): %s" % str(e)) | 1207 | logger.warn("Checksum failure encountered with download of %s - will attempt other sources if available" % u) |
| 1208 | if isinstance(e, NoChecksumError): | 1208 | logger.debug(1, str(e)) |
| 1209 | elif isinstance(e, NoChecksumError): | ||
| 1209 | raise | 1210 | raise |
| 1210 | else: | 1211 | else: |
| 1211 | logger.warn('Failed to fetch URL %s, attempting MIRRORS if available' % u) | 1212 | logger.warn('Failed to fetch URL %s, attempting MIRRORS if available' % u) |
| @@ -1227,6 +1228,8 @@ class Fetch(object): | |||
| 1227 | except BBFetchException as e: | 1228 | except BBFetchException as e: |
| 1228 | if isinstance(e, NoChecksumError): | 1229 | if isinstance(e, NoChecksumError): |
| 1229 | logger.error("%s" % str(e)) | 1230 | logger.error("%s" % str(e)) |
| 1231 | elif isinstance(e, ChecksumError): | ||
| 1232 | logger.error("Checksum failure fetching %s" % u) | ||
| 1230 | raise | 1233 | raise |
| 1231 | 1234 | ||
| 1232 | finally: | 1235 | finally: |
