[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6829/8267] bitbake: fetch2: fire an event when there are missing checksums
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6829/8267] bitbake: fetch2: fire an event when there are missing checksums
- Date: Sun, 17 Dec 2017 05:23:38 +0000 (UTC)
commit 002a99c6b99116be461802360124a9fd6fef6379
Author: Paul Eggleton <paul eggleton linux intel com>
Date: Wed Jul 19 11:56:11 2017 +0200
bitbake: fetch2: fire an event when there are missing checksums
If BB_STRICT_CHECKSUMS is set to anything other than "1" i.e. we're not
going to raise an error, then fire an event so that scripts can listen
for it and get the checksums.
(Bitbake rev: 8b2ccb4b865f2df118ef668847df682a83f9c500)
Signed-off-by: Paul Eggleton <paul eggleton linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
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 2e615b2..74ba37f 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -39,6 +39,7 @@ import errno
import bb.persist_data, bb.utils
import bb.checksum
import bb.process
+import bb.event
__version__ = "2"
_checksum_cache = bb.checksum.FileChecksumCache()
@@ -142,6 +143,13 @@ class NonLocalMethod(Exception):
def __init__(self):
Exception.__init__(self)
+class MissingChecksumEvent(bb.event.Event):
+ def __init__(self, url, md5sum, sha256sum):
+ self.url = url
+ self.checksums = {'md5sum': md5sum,
+ 'sha256sum': sha256sum}
+ bb.event.Event.__init__(self)
+
class URI(object):
"""
@@ -584,6 +592,8 @@ def verify_checksum(ud, d, precomputed={}):
ud.sha256_name, sha256data))
raise NoChecksumError('Missing SRC_URI checksum', ud.url)
+ bb.event.fire(MissingChecksumEvent(ud.url, md5data, sha256data), d)
+
if strict == "ignore":
return {
_MD5_KEY: md5data,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]