1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 13:49:49 +00:00

bitbake: 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.

(Bitbake rev: c3168df330a4563cbd03ba74de55a22217d823ed)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt
2021-02-19 20:37:00 -06:00
committed by Richard Purdie
parent 90e5cce0e3
commit 40f5a289d5
7 changed files with 26 additions and 26 deletions
+2 -2
View File
@@ -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: