summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index d911307f6e..12ebce2687 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -345,11 +345,17 @@ def verify_checksum(u, ud, d):
345 # We want to alert the user if a checksum is defined in the recipe but 345 # We want to alert the user if a checksum is defined in the recipe but
346 # it does not match. 346 # it does not match.
347 msg = "" 347 msg = ""
348 mismatch = False
348 if md5mismatch and ud.md5_expected: 349 if md5mismatch and ud.md5_expected:
349 msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected" % (ud.localpath, 'md5', md5data, ud.md5_expected) 350 msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected" % (ud.localpath, 'md5', md5data, ud.md5_expected)
351 mismatch = True;
350 352
351 if sha256mismatch and ud.sha256_expected: 353 if sha256mismatch and ud.sha256_expected:
352 msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected" % (ud.localpath, 'sha256', sha256data, ud.sha256_expected) 354 msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected" % (ud.localpath, 'sha256', sha256data, ud.sha256_expected)
355 mismatch = True;
356
357 if mismatch:
358 msg = msg + '\nYour checksums:\nSRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' % (ud.md5_name, md5data, ud.sha256_name, sha256data)
353 359
354 if len(msg): 360 if len(msg):
355 raise ChecksumError('Checksum mismatch!%s' % msg, u) 361 raise ChecksumError('Checksum mismatch!%s' % msg, u)