summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 199cdca9ba..6c6915cc5c 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -526,19 +526,19 @@ def verify_checksum(ud, d):
526 if ud.method.recommends_checksum(ud): 526 if ud.method.recommends_checksum(ud):
527 # If strict checking enabled and neither sum defined, raise error 527 # If strict checking enabled and neither sum defined, raise error
528 strict = d.getVar("BB_STRICT_CHECKSUM", True) or None 528 strict = d.getVar("BB_STRICT_CHECKSUM", True) or None
529 if (strict and ud.md5_expected == None and ud.sha256_expected == None): 529 if strict and not (ud.md5_expected or ud.sha256_expected):
530 raise NoChecksumError('No checksum specified for %s, please add at least one to the recipe:\n' 530 raise NoChecksumError('No checksum specified for %s, please add at least one to the recipe:\n'
531 'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' % 531 'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' %
532 (ud.localpath, ud.md5_name, md5data, 532 (ud.localpath, ud.md5_name, md5data,
533 ud.sha256_name, sha256data), ud.url) 533 ud.sha256_name, sha256data), ud.url)
534 534
535 # Log missing sums so user can more easily add them 535 # Log missing sums so user can more easily add them
536 if ud.md5_expected == None: 536 if not ud.md5_expected:
537 logger.warn('Missing md5 SRC_URI checksum for %s, consider adding to the recipe:\n' 537 logger.warn('Missing md5 SRC_URI checksum for %s, consider adding to the recipe:\n'
538 'SRC_URI[%s] = "%s"', 538 'SRC_URI[%s] = "%s"',
539 ud.localpath, ud.md5_name, md5data) 539 ud.localpath, ud.md5_name, md5data)
540 540
541 if ud.sha256_expected == None: 541 if not ud.sha256_expected:
542 logger.warn('Missing sha256 SRC_URI checksum for %s, consider adding to the recipe:\n' 542 logger.warn('Missing sha256 SRC_URI checksum for %s, consider adding to the recipe:\n'
543 'SRC_URI[%s] = "%s"', 543 'SRC_URI[%s] = "%s"',
544 ud.localpath, ud.sha256_name, sha256data) 544 ud.localpath, ud.sha256_name, sha256data)