[oe-commits] [openembedded-core] 09/09: mcextend: Add helper class useful for multiconfig

git at git.openembedded.org git at git.openembedded.org
Sun Mar 3 15:42:10 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 9ad19eb12c24d1ddc967215af0ebafd2cd2cb665
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sat Mar 2 14:34:01 2019 +0000

    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 at linuxfoundation.org>
---
 meta/classes/mcextend.bbclass | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/meta/classes/mcextend.bbclass b/meta/classes/mcextend.bbclass
new file mode 100644
index 0000000..0f8f962
--- /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"
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list