summaryrefslogtreecommitdiffstats
path: root/meta/classes/multilib_global.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/multilib_global.bbclass')
-rw-r--r--meta/classes/multilib_global.bbclass26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index fd0bfe1273..0b41a8a36d 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -13,11 +13,14 @@ def preferred_ml_updates(d):
13 13
14 versions = [] 14 versions = []
15 providers = [] 15 providers = []
16 rproviders = []
16 for v in d.keys(): 17 for v in d.keys():
17 if v.startswith("PREFERRED_VERSION_"): 18 if v.startswith("PREFERRED_VERSION_"):
18 versions.append(v) 19 versions.append(v)
19 if v.startswith("PREFERRED_PROVIDER_"): 20 if v.startswith("PREFERRED_PROVIDER_"):
20 providers.append(v) 21 providers.append(v)
22 if v.startswith("PREFERRED_RPROVIDER_"):
23 rproviders.append(v)
21 24
22 for v in versions: 25 for v in versions:
23 val = d.getVar(v, False) 26 val = d.getVar(v, False)
@@ -91,6 +94,29 @@ def preferred_ml_updates(d):
91 if prov != provexp and d.getVar(prov, False): 94 if prov != provexp and d.getVar(prov, False):
92 d.renameVar(prov, provexp) 95 d.renameVar(prov, provexp)
93 96
97 for prov in rproviders:
98 val = d.getVar(prov, False)
99 pkg = prov.replace("PREFERRED_RPROVIDER_", "")
100 for p in prefixes:
101 newval = p + "-" + val
102
103 # implement variable keys
104 localdata = bb.data.createCopy(d)
105 override = ":virtclass-multilib-" + p
106 localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
107 newname = localdata.expand(prov)
108 if newname != prov and not d.getVar(newname, False):
109 d.setVar(newname, localdata.expand(newval))
110
111 # implement alternative multilib name
112 newname = localdata.expand("PREFERRED_RPROVIDER_" + p + "-" + pkg)
113 if not d.getVar(newname, False) and newval != None:
114 d.setVar(newname, localdata.expand(newval))
115 # Avoid future variable key expansion
116 provexp = d.expand(prov)
117 if prov != provexp and d.getVar(prov, False):
118 d.renameVar(prov, provexp)
119
94 def translate_provide(prefix, prov): 120 def translate_provide(prefix, prov):
95 if not prov.startswith("virtual/"): 121 if not prov.startswith("virtual/"):
96 return prefix + "-" + prov 122 return prefix + "-" + prov