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>
This commit is contained in:
parent
a05d474e5a
commit
24ae636fde
|
@ -589,6 +589,16 @@ class PackageInfo(Event):
|
||||||
Event.__init__(self)
|
Event.__init__(self)
|
||||||
self._pkginfolist = pkginfolist
|
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):
|
class SanityCheck(Event):
|
||||||
"""
|
"""
|
||||||
Event to issue sanity check
|
Event to issue sanity check
|
||||||
|
|
|
@ -477,6 +477,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
|
||||||
|
|
||||||
# ignore
|
# ignore
|
||||||
if isinstance(event, (bb.event.BuildBase,
|
if isinstance(event, (bb.event.BuildBase,
|
||||||
|
bb.event.MetadataEvent,
|
||||||
bb.event.StampUpdate,
|
bb.event.StampUpdate,
|
||||||
bb.event.ConfigParsed,
|
bb.event.ConfigParsed,
|
||||||
bb.event.RecipeParsed,
|
bb.event.RecipeParsed,
|
||||||
|
|
Loading…
Reference in New Issue