diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 10 |
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 | |||
39 | import bb.persist_data, bb.utils | 39 | import bb.persist_data, bb.utils |
40 | import bb.checksum | 40 | import bb.checksum |
41 | import bb.process | 41 | import bb.process |
42 | import 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 | ||
146 | class 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 | ||
146 | class URI(object): | 154 | class 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, |