From 3bda5b1301df902e86619527b9bae4b9dc9af35b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 21 Dec 2010 15:15:42 +0000 Subject: bitbake/fetch: Fix fetch error Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 8c10df4ff..364bdffff 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): if not ud.type in ["http", "https", "ftp", "ftps"]: return + md5data = bb.utils.md5_file(ud.localpath) + sha256data = bb.utils.sha256_file(ud.localpath) + if (ud.md5_expected == None or ud.sha256_expected == None): bb.warn("Missing SRC_URI checksum for %s, consider to add\n" \ "SRC_URI[%s] = \"%s\"\nSRC_URI[%s] = \"%s\"" \ @@ -255,9 +258,6 @@ def verify_checksum(u, ud, d): raise FetchError("No checksum specified for %s." % u) return - md5data = bb.utils.md5_file(ud.localpath) - sha256data = bb.utils.sha256_file(ud.localpath) - if (ud.md5_expected != md5data or ud.sha256_expected != sha256data): bb.error("The checksums for '%s' did not match." % ud.localpath) bb.error("Expected MD5: '%s' and Got: '%s'" % (ud.md5_expected, md5data)) -- cgit v1.2.3