[oe-commits] [bitbake] branch master-next updated: fetch2: Limit shown checksums to sha256

git at git.openembedded.org git at git.openembedded.org
Sat Feb 29 16:20:29 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

The following commit(s) were added to refs/heads/master-next by this push:
     new a3e911e  fetch2: Limit shown checksums to sha256
a3e911e is described below

commit a3e911e27cc175d5061fce88195a8683e57a55a0
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sat Feb 29 16:13:14 2020 +0000

    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.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/__init__.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index b83347a..9734e21 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -34,6 +34,7 @@ _checksum_cache = bb.checksum.FileChecksumCache()
 logger = logging.getLogger("BitBake.Fetcher")
 
 CHECKSUM_LIST = [ "md5", "sha256", "sha1", "sha384", "sha512" ]
+SHOWN_CHECKSUM_LIST = ["sha256"]
 
 class BBFetchException(Exception):
     """Class all fetch exceptions inherit from"""
@@ -580,7 +581,9 @@ def verify_checksum(ud, d, precomputed={}):
     checksum_dict = {ci["id"] : ci["data"] for ci in checksum_infos}
     checksum_event = {"%ssum" % ci["id"] : ci["data"] for ci in checksum_infos}
 
-    checksum_lines = ["SRC_URI[%s] = \"%s\"" % (ci["name"], ci["data"]) for ci in checksum_infos]
+    for ci in checksum_infos:
+        if ci["id"] in SHOWN_CHECKSUM_LIST:
+            checksum_lines = ["SRC_URI[%s] = \"%s\"" % (ci["name"], ci["data"])]
 
     # If no checksum has been provided
     if ud.method.recommends_checksum(ud) and all(ci["expected"] is None for ci in checksum_infos):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list