summaryrefslogtreecommitdiffstats
path: root/bitbake
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-22 12:19:44 +0100
commit24ae636fde4ef5683190c9155dd803ce87a311c4 (patch)
tree150280b54051880cc10687cf972749bd34d9fddb /bitbake
parenta05d474e5a0688ba80cab75d95e3c057c5db4f97 (diff)
downloadpoky-24ae636fde4ef5683190c9155dd803ce87a311c4.tar.gz
bitbake: 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. (Bitbake rev: ae1ea51aaab73e010d1c3db39df058bebebc11dd) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/event.py10
-rw-r--r--bitbake/lib/bb/ui/knotty.py1
2 files changed, 11 insertions, 0 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 67cfceaf53..10eae5fde8 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -589,6 +589,16 @@ class PackageInfo(Event):
589 Event.__init__(self) 589 Event.__init__(self)
590 self._pkginfolist = pkginfolist 590 self._pkginfolist = pkginfolist
591 591
592class MetadataEvent(Event):
593 """
594 Generic event that target for OE-Core classes
595 to report information during asynchrous execution
596 """
597 def __init__(self, eventtype, eventdata):
598 Event.__init__(self)
599 self.type = eventtype
600 self.data = eventdata
601
592class SanityCheck(Event): 602class SanityCheck(Event):
593 """ 603 """
594 Event to issue sanity check 604 Event to issue sanity check
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 0211b50aba..c1ee9f5269 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -477,6 +477,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
477 477
478 # ignore 478 # ignore
479 if isinstance(event, (bb.event.BuildBase, 479 if isinstance(event, (bb.event.BuildBase,
480 bb.event.MetadataEvent,
480 bb.event.StampUpdate, 481 bb.event.StampUpdate,
481 bb.event.ConfigParsed, 482 bb.event.ConfigParsed,
482 bb.event.RecipeParsed, 483 bb.event.RecipeParsed,