diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2010-04-08 09:47:12 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2010-04-12 20:43:51 +0200 |
commit | 353b4dc7223f8dd50fcf21d7c031b9dd91a724a2 (patch) | |
tree | 443bb7955e6e373004d58588a4bf1c36a8a35fc6 /classes/base.bbclass | |
parent | f529623b2b32ea132680f009b32e8e6d8b2bb3c9 (diff) | |
download | openembedded-353b4dc7223f8dd50fcf21d7c031b9dd91a724a2.tar.gz |
utils.bbclass: simplify checksum check, prepare for checksums.ini removal
* show note, when there are checksums only in checksums.ini (prepare for
script for moving all to recipes)
* parse checksums.ini only when there is no checksum in recipe (could be
faster, but for more checked items in SRC_URI it is parsed repeatedly)
* if one checksum doesn't match then count and show both (md5 as well as
sha256) - usefull for copy&paste checksums for new recipe.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r-- | classes/base.bbclass | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 637bedd588..d3bfa768c1 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -112,24 +112,6 @@ python base_do_fetch() { raise bb.build.FuncFailed("Unknown fetch Error: %s" % value) - # Verify the SHA and MD5 sums we have in OE and check what do - # in - checksum_paths = bb.data.getVar('BBPATH', d, True).split(":") - - # reverse the list to give precedence to directories that - # appear first in BBPATH - checksum_paths.reverse() - - checksum_files = ["%s/conf/checksums.ini" % path for path in checksum_paths] - try: - parser = base_chk_load_parser(checksum_files) - except ValueError: - bb.note("No conf/checksums.ini found, not checking checksums") - return - except: - bb.note("Creating the CheckSum parser failed: %s:%s" % (sys.exc_info()[0], sys.exc_info()[1])) - return - pv = bb.data.getVar('PV', d, True) pn = bb.data.getVar('PN', d, True) @@ -146,11 +128,11 @@ python base_do_fetch() { if not "name" in params and first_uri: first_uri = False params["name"] = "" - if not (base_chk_file_vars(parser, localpath, params, d) or base_chk_file(parser, pn, pv,uri, localpath, d)): + if not base_chk_file(pn, pv, uri, localpath, params, d): if not bb.data.getVar("OE_ALLOW_INSECURE_DOWNLOADS", d, True): - bb.fatal("%s-%s: %s has no checksum defined, cannot check archive integrity" % (pn,pv,uri)) + bb.fatal("%s-%s: %s cannot check archive integrity" % (pn,pv,uri)) else: - bb.note("%s-%s: %s has no checksum defined, archive integrity not checked" % (pn,pv,uri)) + bb.note("%s-%s: %s cannot check archive integrity" % (pn,pv,uri)) except Exception: raise bb.build.FuncFailed("Checksum of '%s' failed" % uri) } |