From b8ed2098bdea2afd93ab4e3e1b834f3a31cb60de Mon Sep 17 00:00:00 2001 From: Alejandro Hernandez Date: Tue, 30 Sep 2014 11:21:58 -0500 Subject: fetcher: fix BB_STRICT_CHECKSUM datatype check Forcing strict to be a string, to avoid problems when performing comparisons [YOCTO #6762] Signed-off-by: Alejandro Hernandez Signed-off-by: Richard Purdie --- lib/bb/fetch2/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/bb/fetch2/__init__.py') diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 87cf7e61a6..59a7f1b6bd 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -543,8 +543,8 @@ def verify_checksum(ud, d): if ud.method.recommends_checksum(ud): # If strict checking enabled and neither sum defined, raise error - strict = d.getVar("BB_STRICT_CHECKSUM", True) or None - if strict and not (ud.md5_expected or ud.sha256_expected): + strict = d.getVar("BB_STRICT_CHECKSUM", "1") or "0" + if (strict == "1") and not (ud.md5_expected or ud.sha256_expected): logger.error('No checksum specified for %s, please add at least one to the recipe:\n' 'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' % (ud.localpath, ud.md5_name, md5data, -- cgit 1.2.3-korg