diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-12-21 15:15:42 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-12-21 15:15:42 +0000 |
commit | 3bda5b1301df902e86619527b9bae4b9dc9af35b (patch) | |
tree | c46b3478ee08c47736852323ec2353ca70b0d477 | |
parent | 9c4e63b18b3730707e3642daa0d8a66252ffdf87 (diff) | |
download | poky-3bda5b1301df902e86619527b9bae4b9dc9af35b.tar.gz |
bitbake/fetch: Fix fetch error
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 8c10df4ffe..364bdffff1 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -247,6 +247,9 @@ def verify_checksum(u, ud, d): | |||
247 | if not ud.type in ["http", "https", "ftp", "ftps"]: | 247 | if not ud.type in ["http", "https", "ftp", "ftps"]: |
248 | return | 248 | return |
249 | 249 | ||
250 | md5data = bb.utils.md5_file(ud.localpath) | ||
251 | sha256data = bb.utils.sha256_file(ud.localpath) | ||
252 | |||
250 | if (ud.md5_expected == None or ud.sha256_expected == None): | 253 | if (ud.md5_expected == None or ud.sha256_expected == None): |
251 | bb.warn("Missing SRC_URI checksum for %s, consider to add\n" \ | 254 | bb.warn("Missing SRC_URI checksum for %s, consider to add\n" \ |
252 | "SRC_URI[%s] = \"%s\"\nSRC_URI[%s] = \"%s\"" \ | 255 | "SRC_URI[%s] = \"%s\"\nSRC_URI[%s] = \"%s\"" \ |
@@ -255,9 +258,6 @@ def verify_checksum(u, ud, d): | |||
255 | raise FetchError("No checksum specified for %s." % u) | 258 | raise FetchError("No checksum specified for %s." % u) |
256 | return | 259 | return |
257 | 260 | ||
258 | md5data = bb.utils.md5_file(ud.localpath) | ||
259 | sha256data = bb.utils.sha256_file(ud.localpath) | ||
260 | |||
261 | if (ud.md5_expected != md5data or ud.sha256_expected != sha256data): | 261 | if (ud.md5_expected != md5data or ud.sha256_expected != sha256data): |
262 | bb.error("The checksums for '%s' did not match." % ud.localpath) | 262 | bb.error("The checksums for '%s' did not match." % ud.localpath) |
263 | bb.error("Expected MD5: '%s' and Got: '%s'" % (ud.md5_expected, md5data)) | 263 | bb.error("Expected MD5: '%s' and Got: '%s'" % (ud.md5_expected, md5data)) |