diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-10 17:31:48 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-10 22:45:21 +0000 |
commit | 4137923598e2c1f9e4e54a3bf0f98b823fd54ff1 (patch) | |
tree | 6a0469d535ebe593cab77467b86811dfc00156f6 /meta/classes/multilib_global.bbclass | |
parent | 2a7a02c513a55284ef5af0580f5393225d60ba85 (diff) | |
download | poky-4137923598e2c1f9e4e54a3bf0f98b823fd54ff1.tar.gz |
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>
Diffstat (limited to 'meta/classes/multilib_global.bbclass')
-rw-r--r-- | meta/classes/multilib_global.bbclass | 26 |
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 |