mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 03:32:13 +02:00
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. (From OE-Core rev: ced4ac760926ce43a937dad2be3b873b1beec6aa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user