event: Prevent bitbake from executing events that don't exist for multiconfig target
PATCH 1/1 event: Prevent bitbake from executing events that don't exist for multiconfig target
When multiconfig is used bitbake might try to run events that don't exist for specific mc target. In cooker.py we pass self.databuilder.mcdata[mc] data that contains names of events' handlers per mc target, but fire_class_handlers uses global _handlers variable that is created during parsing of all the targets.
See [YOCTO #13071] for detailed bug information.
I added a condition to check if the handler exists for target using __BBHANDLERS variable.
Signed-off-by Tomasz Dziendzielski <[email protected]>
--- lib/bb/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/event.py +1 -1
@@ -114,7 +114,7 @@ def fire_class_handlers(event, d): eid = str(event.__class__)[8:-2] evt_hmap = _event_handler_map.get(eid, {}) for name, handler in list(_handlers.items()): - if name in _catchall_handlers or name in evt_hmap: + if name in d.getVar("__BBHANDLERS") and (name in _catchall_handlers or name in evt_hmap): if _eventfilter: if not _eventfilter(name, handler, event, d): continue
Signature · 1 line
2.30.0