summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-07 15:03:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-07 15:10:58 +0100
commit0b4d895562274d76515d9a0d46b297f2fc5ac6cb (patch)
tree1a1b069c0608488a7c1dc1fa624e49b3ff625e62 /meta/classes
parenta671ced0ea7c5775d2f2699d3a720c6d0c11f743 (diff)
downloadpoky-0b4d895562274d76515d9a0d46b297f2fc5ac6cb.tar.gz
base.bbclass: Fix multilib PREFERRED_VERSION handling
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. (From OE-Core rev: d2b18d7692229d4b87b38becf173b1f8b6e90025) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 10cb84ac91..8a74d6e578 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -157,15 +157,15 @@ def preferred_ml_updates(d):
157 for v in versions: 157 for v in versions:
158 val = d.getVar(v, False) 158 val = d.getVar(v, False)
159 pkg = v.replace("PREFERRED_VERSION_", "") 159 pkg = v.replace("PREFERRED_VERSION_", "")
160 if pkg.endswith(("-native", "-crosssdk")) or pkg.startswith(("nativesdk-", "virtual/nativesdk-")): 160 if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
161 continue 161 continue
162 if 'cross-canadian' in pkg: 162 if '-cross-' in pkg and '${' in pkg:
163 for p in prefixes: 163 for p in prefixes:
164 localdata = bb.data.createCopy(d) 164 localdata = bb.data.createCopy(d)
165 override = ":virtclass-multilib-" + p 165 override = ":virtclass-multilib-" + p
166 localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override) 166 localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
167 bb.data.update_data(localdata) 167 bb.data.update_data(localdata)
168 newname = localdata.expand(v) 168 newname = localdata.expand(v).replace("PREFERRED_VERSION_", "PREFERRED_VERSION_" + p + '-')
169 if newname != v: 169 if newname != v:
170 newval = localdata.expand(val) 170 newval = localdata.expand(val)
171 d.setVar(newname, newval) 171 d.setVar(newname, newval)