summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-02 14:34:01 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-03 15:38:08 +0000
commit9ad19eb12c24d1ddc967215af0ebafd2cd2cb665 (patch)
treeb3c4f5d43aaf7b13f799281c7edc8975fa2b94b8 /meta/classes
parent9c20f8c6e4bb5157550e347ffd6ef790eb6a1200 (diff)
downloadopenembedded-core-9ad19eb12c24d1ddc967215af0ebafd2cd2cb665.tar.gz
openembedded-core-9ad19eb12c24d1ddc967215af0ebafd2cd2cb665.tar.bz2
openembedded-core-9ad19eb12c24d1ddc967215af0ebafd2cd2cb665.zip
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/mcextend.bbclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes/mcextend.bbclass b/meta/classes/mcextend.bbclass
new file mode 100644
index 0000000000..0f8f962298
--- /dev/null
+++ b/meta/classes/mcextend.bbclass
@@ -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"
+