mcextend: Add helper class useful for multiconfig

This class allows users to easily create multiconfig BBCLASSEXTEND recipes
and is generally useful. It will be used by new tests so add as a general
feature.

(From OE-Core rev: 9ad19eb12c24d1ddc967215af0ebafd2cd2cb665)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2019-03-02 14:34:01 +00:00
parent 7519b0fc32
commit d22b6e03a5

View File

@@ -0,0 +1,16 @@
python mcextend_virtclass_handler () {
cls = e.data.getVar("BBEXTENDCURR")
variant = e.data.getVar("BBEXTENDVARIANT")
if cls != "mcextend" or not variant:
return
override = ":virtclass-mcextend-" + variant
e.data.setVar("PN", e.data.getVar("PN", False) + "-" + variant)
e.data.setVar("MCNAME", variant)
e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
}
addhandler mcextend_virtclass_handler
mcextend_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"