]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
fetch2: Don't show checksum warnings if a single checksum was supplied
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Jan 2016 13:01:28 +0000 (13:01 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Jan 2016 13:08:28 +0000 (13:08 +0000)
If one checksum is supplied to a SRC_URI, we really don't want to show
warnings about the other type which isn't present as one checksum
is really good enough for most cases.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/fetch2/__init__.py

index 0f9c6436952cbf84275e55d506e9e37a70b29b59..5b416ab55a5017c4e569d7578844b91da99d8026 100644 (file)
@@ -585,12 +585,10 @@ def verify_checksum(ud, d, precomputed={}):
             raise NoChecksumError('Missing SRC_URI checksum', ud.url)
 
         # Log missing sums so user can more easily add them
-        if not ud.md5_expected:
+        if not ud.md5_expected and not ud.sha256_expected:
             logger.warn('Missing md5 SRC_URI checksum for %s, consider adding to the recipe:\n'
                         'SRC_URI[%s] = "%s"',
                         ud.localpath, ud.md5_name, md5data)
-
-        if not ud.sha256_expected:
             logger.warn('Missing sha256 SRC_URI checksum for %s, consider adding to the recipe:\n'
                         'SRC_URI[%s] = "%s"',
                         ud.localpath, ud.sha256_name, sha256data)