Skip to contentSkip to conversation

packagedata/multilib: Fix search patch for multilib builds

PATCH Richard Purdie 1 participant 1 message Sep 26, 2012

lore
Share & tools
lore
#0 lore raw

The current multilib search path code for packagedata is flawed since it doesn't correctly handle changes in the TARGET_VENDOR/TARGET_OS that multilib may make. This patch enhances the code to correctly build the search paths so multilib packagedata is found correctly.

---

meta/classes/multilib.bbclass +0 -2
index b1a593e..73ccf3a 100644
@@ -32,8 +32,6 @@ python multilib_virtclass_handler () {
     e.data.setVar("MLPREFIX", variant + "-")
     e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
     e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)
-    if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + variant, False) is None:
-	    e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant)
     e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
 }
 
meta/classes/multilib_global.bbclass +5 -0
index b76fd94..f55e3a2 100644
@@ -2,6 +2,11 @@ python multilib_virtclass_handler_global () {
     if not e.data:
         return
 
+    if isinstance(e, bb.event.RecipePreFinalise):
+        for v in e.data.getVar("MULTILIB_VARIANTS", True).split():
+            if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + v, False) is None:
+	       e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + v, e.data.getVar("TARGET_VENDOR", False) + "ml" + v)
+
     variant = e.data.getVar("BBEXTENDVARIANT", True)
 
     if isinstance(e, bb.event.RecipeParsed) and not variant:
meta/lib/oe/packagedata.py +30 -12

51 lines not on this page · raw message