aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-10 17:31:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-10 22:45:13 +0000
commitced4ac760926ce43a937dad2be3b873b1beec6aa (patch)
tree9faedbb4dff1b34381ba3a26a9b2a75703ef86dc
parent7e98c295c1bb511ece51b5f8c97f26c173ddaf76 (diff)
downloadopenembedded-core-contrib-ced4ac760926ce43a937dad2be3b873b1beec6aa.tar.gz
openembedded-core-contrib-ced4ac760926ce43a937dad2be3b873b1beec6aa.tar.bz2
openembedded-core-contrib-ced4ac760926ce43a937dad2be3b873b1beec6aa.zip
multilib_global: Handle PREFERRED_RPROVIDER
Running: $ oe-selftest -r sstatetests.SStateTests.test_sstate_sametune_samesigs after commit cdcebd81c872cb7386c658998e27cf24e1d0447c results in: NOTE: Resolving any missing task queue dependencies NOTE: Multiple providers are available for runtime lib32-initd-functions (lib32-initscripts, lib32-lsbinitscripts) Consider defining a PREFERRED_RPROVIDER entry to match lib32-initd-functions and will occasionally pick a different value on the second stamps run causing a test failure. Update the multilib code to handle PREFERRED_RPROVIDER too. There is a bigger worry here which is why the builds aren't deterministic. This is caused by a bug in bitbake's providers.py and a separate fix will be sent for that which would cause this test to always pass or always fail. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 fd0bfe12738..0b41a8a36d0 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -13,11 +13,14 @@ def preferred_ml_updates(d):
versions = []
providers = []
+ rproviders = []
for v in d.keys():
if v.startswith("PREFERRED_VERSION_"):
versions.append(v)
if v.startswith("PREFERRED_PROVIDER_"):
providers.append(v)
+ if v.startswith("PREFERRED_RPROVIDER_"):
+ rproviders.append(v)
for v in versions:
val = d.getVar(v, False)
@@ -91,6 +94,29 @@ def preferred_ml_updates(d):
if prov != provexp and d.getVar(prov, False):
d.renameVar(prov, provexp)
+ for prov in rproviders:
+ val = d.getVar(prov, False)
+ pkg = prov.replace("PREFERRED_RPROVIDER_", "")
+ for p in prefixes:
+ newval = p + "-" + val
+
+ # implement variable keys
+ localdata = bb.data.createCopy(d)
+ override = ":virtclass-multilib-" + p
+ localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+ newname = localdata.expand(prov)
+ if newname != prov and not d.getVar(newname, False):
+ d.setVar(newname, localdata.expand(newval))
+
+ # implement alternative multilib name
+ newname = localdata.expand("PREFERRED_RPROVIDER_" + p + "-" + pkg)
+ if not d.getVar(newname, False) and newval != None:
+ d.setVar(newname, localdata.expand(newval))
+ # Avoid future variable key expansion
+ provexp = d.expand(prov)
+ if prov != provexp and d.getVar(prov, False):
+ d.renameVar(prov, provexp)
+
def translate_provide(prefix, prov):
if not prov.startswith("virtual/"):
return prefix + "-" + prov