[bitbake-devel] [PATCH] fetch2: print checksums when they are different then expected

Martin Jansa martin.jansa at gmail.com
Tue Jul 31 11:01:31 UTC 2012


* in form which can be copied into a recipe without modification
* like oe-classic did since:
  http://git.openembedded.org/openembedded/commit/?id=68abc465559a68e9201c9525be3c4acc6297eaed
* it shows them in right form when they are missing completely, but in
  more verbose form when different

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 lib/bb/fetch2/__init__.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index fa963be..46e9b6e 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -348,6 +348,9 @@ def verify_checksum(u, ud, d):
     if sha256mismatch and ud.sha256_expected:
         msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected" % (ud.localpath, 'sha256', sha256data, ud.sha256_expected)
 
+    if md5mismatch or sha256mismatch:
+        msg = msg + '\nYour checksums:\nSRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' % (ud.md5_name, md5data, ud.sha256_name, sha256data)
+
     if len(msg):
         raise ChecksumError('Checksum mismatch!%s' % msg, u)
 
-- 
1.7.8.6





More information about the bitbake-devel mailing list