From c3168df330a4563cbd03ba74de55a22217d823ed Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Fri, 19 Feb 2021 20:37:00 -0600 Subject: event: Fix broken builds when multiconfig has a hyphen in the name 5f7fdf7b2d ("bitbake: event: Prevent bitbake from executing event handler for wrong multiconfig target") broke multiconfig builds contain a hyphen, since it's attempt to use the multiconfig as part of a function name and python functions are not allowed to contain a hyphen. Rework the bitbake multiconfig test to test a multiconfig with a hyphen and one with an underscore to validate this doesn't break in the future. Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie --- lib/bb/event.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/bb/event.py') diff --git a/lib/bb/event.py b/lib/bb/event.py index ff8995946..23e1f3187 100644 --- a/lib/bb/event.py +++ b/lib/bb/event.py @@ -234,7 +234,7 @@ def register(name, handler, mask=None, filename=None, lineno=None, data=None): if data and data.getVar("BB_CURRENT_MC"): mc = data.getVar("BB_CURRENT_MC") - name = '%s%s' % (mc, name) + name = '%s%s' % (mc.replace('-', '_'), name) # already registered if name in _handlers: @@ -286,7 +286,7 @@ def remove(name, handler, data=None): if data: if data.getVar("BB_CURRENT_MC"): mc = data.getVar("BB_CURRENT_MC") - name = '%s%s' % (mc, name) + name = '%s%s' % (mc.replace('-', '_'), name) _handlers.pop(name) if name in _catchall_handlers: -- cgit 1.2.3-korg