summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 2e615b2d6a..74ba37f458 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -39,6 +39,7 @@ import errno
39import bb.persist_data, bb.utils 39import bb.persist_data, bb.utils
40import bb.checksum 40import bb.checksum
41import bb.process 41import bb.process
42import bb.event
42 43
43__version__ = "2" 44__version__ = "2"
44_checksum_cache = bb.checksum.FileChecksumCache() 45_checksum_cache = bb.checksum.FileChecksumCache()
@@ -142,6 +143,13 @@ class NonLocalMethod(Exception):
142 def __init__(self): 143 def __init__(self):
143 Exception.__init__(self) 144 Exception.__init__(self)
144 145
146class MissingChecksumEvent(bb.event.Event):
147 def __init__(self, url, md5sum, sha256sum):
148 self.url = url
149 self.checksums = {'md5sum': md5sum,
150 'sha256sum': sha256sum}
151 bb.event.Event.__init__(self)
152
145 153
146class URI(object): 154class URI(object):
147 """ 155 """
@@ -584,6 +592,8 @@ def verify_checksum(ud, d, precomputed={}):
584 ud.sha256_name, sha256data)) 592 ud.sha256_name, sha256data))
585 raise NoChecksumError('Missing SRC_URI checksum', ud.url) 593 raise NoChecksumError('Missing SRC_URI checksum', ud.url)
586 594
595 bb.event.fire(MissingChecksumEvent(ud.url, md5data, sha256data), d)
596
587 if strict == "ignore": 597 if strict == "ignore":
588 return { 598 return {
589 _MD5_KEY: md5data, 599 _MD5_KEY: md5data,