All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] base.bbclass: Fix multilib PREFERRED_VERSION handling
@ 2014-05-07 14:03 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-05-07 14:03 UTC (permalink / raw)
  To: openembedded-core

Now that gcc-cross, gcc-crosssdk and others have expanded variables in
their names, the code that previous just applied to cross-canadian needs
expanding to cover the other cases. Improve the conditional and also
fix a bug where the multilib prefix wasn't being added into the generated
versions.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 5c2d6a2..899629b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -157,15 +157,15 @@ def preferred_ml_updates(d):
     for v in versions:
         val = d.getVar(v, False)
         pkg = v.replace("PREFERRED_VERSION_", "")
-        if pkg.endswith(("-native", "-crosssdk")) or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
+        if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
             continue
-        if 'cross-canadian' in pkg:
+        if '-cross-' in pkg and '${' in pkg:
             for p in prefixes:
                 localdata = bb.data.createCopy(d)
                 override = ":virtclass-multilib-" + p
                 localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
                 bb.data.update_data(localdata)
-                newname = localdata.expand(v)
+                newname = localdata.expand(v).replace("PREFERRED_VERSION_", "PREFERRED_VERSION_" + p + '-')
                 if newname != v:
                     newval = localdata.expand(val)
                     d.setVar(newname, newval)




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-07 14:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07 14:03 [PATCH] base.bbclass: Fix multilib PREFERRED_VERSION handling Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.