summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-29 16:13:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-02 16:16:27 +0000
commitbed52fbf3cad0729688cc11883d5233eb5a4c6a0 (patch)
tree791fd9db2562a864d2ddf5df174f2842fd00501d /bitbake
parent5e1f0d593e6165405b292ff900071b31b81b8e42 (diff)
downloadpoky-bed52fbf3cad0729688cc11883d5233eb5a4c6a0.tar.gz
bitbake: fetch2: Limit shown checksums to sha256
Currently bitbake will list many checksums for a recipe when none are present, encouraging users to add them all to a recipe. We don't need/want them all. We used to show md5 and sha256 but given the concerns about md5, switch to showing just sha256 going forward which seems like the sensible one to standardise upon. There will be no change to existing recipe functionality. (Bitbake rev: 47f0c849ed13ba554d9523b926d92405e8251702) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index b83347ad90..9734e21126 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -34,6 +34,7 @@ _checksum_cache = bb.checksum.FileChecksumCache()
34logger = logging.getLogger("BitBake.Fetcher") 34logger = logging.getLogger("BitBake.Fetcher")
35 35
36CHECKSUM_LIST = [ "md5", "sha256", "sha1", "sha384", "sha512" ] 36CHECKSUM_LIST = [ "md5", "sha256", "sha1", "sha384", "sha512" ]
37SHOWN_CHECKSUM_LIST = ["sha256"]
37 38
38class BBFetchException(Exception): 39class BBFetchException(Exception):
39 """Class all fetch exceptions inherit from""" 40 """Class all fetch exceptions inherit from"""
@@ -580,7 +581,9 @@ def verify_checksum(ud, d, precomputed={}):
580 checksum_dict = {ci["id"] : ci["data"] for ci in checksum_infos} 581 checksum_dict = {ci["id"] : ci["data"] for ci in checksum_infos}
581 checksum_event = {"%ssum" % ci["id"] : ci["data"] for ci in checksum_infos} 582 checksum_event = {"%ssum" % ci["id"] : ci["data"] for ci in checksum_infos}
582 583
583 checksum_lines = ["SRC_URI[%s] = \"%s\"" % (ci["name"], ci["data"]) for ci in checksum_infos] 584 for ci in checksum_infos:
585 if ci["id"] in SHOWN_CHECKSUM_LIST:
586 checksum_lines = ["SRC_URI[%s] = \"%s\"" % (ci["name"], ci["data"])]
584 587
585 # If no checksum has been provided 588 # If no checksum has been provided
586 if ud.method.recommends_checksum(ud) and all(ci["expected"] is None for ci in checksum_infos): 589 if ud.method.recommends_checksum(ud) and all(ci["expected"] is None for ci in checksum_infos):