]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: Add compatibility package name mapping handler
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 27 Jul 2011 08:17:53 +0000 (09:17 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 27 Jul 2011 14:45:28 +0000 (15:45 +0100)
This means if PKGARCHCOMPAT_ARMV7A is set, "armv7a-vfp-neon" is renamed
to be "armv7a". Other compatibility mappings can be added as needed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass

index f12b3cb8701cd13a037ae1b15e31602aead95ff3..3ed1bb84b901ea6ff3b3ca2185768ff6c9a8e4e5 100644 (file)
@@ -133,6 +133,13 @@ def generate_git_config(e):
                 f.write(proxy_command)
                 f.close
 
+def pkgarch_mapping(d):
+    # Compatibility mappings of TUNE_PKGARCH (opt in)
+    if d.getVar("PKGARCHCOMPAT_ARMV7A", True):
+        if d.getVar("TUNE_PKGARCH", True) == "armv7a-vfp-neon":
+            d.setVar("TUNE_PKGARCH", "armv7a")
+
+
 addhandler base_eventhandler
 python base_eventhandler() {
        from bb import note, error, data
@@ -203,6 +210,7 @@ python base_eventhandler() {
 
         if name == "ConfigParsed":
                 generate_git_config(e)
+                pkgarch_mapping(e.data)
 
        if not data in e.__dict__:
                return