summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-12-20 14:48:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-22 14:29:13 +0000
commit005af45191ded6185c618c708181b31281e43092 (patch)
treee7e81a1dfe354d71037a14b3d97577ae93a8ba2b /bitbake
parent1edb126af3d614a1d9fb9561b1f1f858ec452563 (diff)
downloadast2050-yocto-poky-005af45191ded6185c618c708181b31281e43092.zip
ast2050-yocto-poky-005af45191ded6185c618c708181b31281e43092.tar.gz
bitbake: fetch2: avoid printing "no checksum" error message twice
Because of the way we were handling this error, it was printed twice - once via logger.error() (to avoid the log being printed) and a second time when the exception gets wrapped in a FuncFailed at a higher level. Call logger.error() earlier and change the text we send in the exception to be more brief, so it more closely resembles the behaviour when there is an invalid checksum. (Bitbake rev: 46765369d7f76ec7f67b90430131a79eb6a66235) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 6c6915c..8fdf59c 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -527,10 +527,11 @@ def verify_checksum(ud, d):
# 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):
- raise NoChecksumError('No checksum specified for %s, please add at least one to the recipe:\n'
+ 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,
- ud.sha256_name, sha256data), ud.url)
+ ud.sha256_name, sha256data))
+ raise NoChecksumError('Missing SRC_URI checksum', ud.url)
# Log missing sums so user can more easily add them
if not ud.md5_expected:
@@ -1424,9 +1425,7 @@ class Fetch(object):
update_stamp(ud, self.d)
except BBFetchException as e:
- if isinstance(e, NoChecksumError):
- logger.error("%s" % str(e))
- elif isinstance(e, ChecksumError):
+ if isinstance(e, ChecksumError):
logger.error("Checksum failure fetching %s" % u)
raise
OpenPOWER on IntegriCloud