summaryrefslogtreecommitdiffstats
path: root/lib/bb/event.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-09-18 13:15:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-18 15:14:13 +0100
commitae1ea51aaab73e010d1c3db39df058bebebc11dd (patch)
tree508a34e65139ac7801a97c5d331abc7bc382bdfc /lib/bb/event.py
parent3e094da513e1220319288806cb76ddf804772afd (diff)
downloadbitbake-contrib-ae1ea51aaab73e010d1c3db39df058bebebc11dd.tar.gz
bitbake: event: adding generic event for metadata usage
Adding the generic bb.event.MetadataEvent that is targeted specifically at metadata usage. This is needed in order to let the metadata code send and receive events during asynchrous execution without having to define each event specifically in Bitbake. Metadata code should subscribe to and fire the MetadataEvent in order to communicate asynchronously, and identify the object using event.type field, and parse the data in the event.data field. Knotty UI will ignore these event by default. This deprecates RequestPackageInfo/PackageInfo, and that event pair will be removed in the future. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/event.py')
-rw-r--r--lib/bb/event.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 67cfceaf5..10eae5fde 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -589,6 +589,16 @@ class PackageInfo(Event):
Event.__init__(self)
self._pkginfolist = pkginfolist
+class MetadataEvent(Event):
+ """
+ Generic event that target for OE-Core classes
+ to report information during asynchrous execution
+ """
+ def __init__(self, eventtype, eventdata):
+ Event.__init__(self)
+ self.type = eventtype
+ self.data = eventdata
+
class SanityCheck(Event):
"""
Event to issue sanity check