summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/providers.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/providers.py')
-rw-r--r--bitbake/lib/bb/providers.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
index b2f98963d8..4543447057 100644
--- a/bitbake/lib/bb/providers.py
+++ b/bitbake/lib/bb/providers.py
@@ -84,10 +84,10 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
84 preferred_ver = None 84 preferred_ver = None
85 85
86 localdata = data.createCopy(cfgData) 86 localdata = data.createCopy(cfgData)
87 bb.data.setVar('OVERRIDES', "%s:pn-%s:%s" % (data.getVar('OVERRIDES', localdata), pn, pn), localdata) 87 localdata.setVar('OVERRIDES', "%s:pn-%s:%s" % (data.getVar('OVERRIDES', localdata), pn, pn))
88 bb.data.update_data(localdata) 88 bb.data.update_data(localdata)
89 89
90 preferred_v = bb.data.getVar('PREFERRED_VERSION', localdata, True) 90 preferred_v = localdata.getVar('PREFERRED_VERSION', True)
91 if preferred_v: 91 if preferred_v:
92 m = re.match('(\d+:)*(.*)(_.*)*', preferred_v) 92 m = re.match('(\d+:)*(.*)(_.*)*', preferred_v)
93 if m: 93 if m:
@@ -248,7 +248,7 @@ def filterProviders(providers, item, cfgData, dataCache):
248 248
249 eligible = _filterProviders(providers, item, cfgData, dataCache) 249 eligible = _filterProviders(providers, item, cfgData, dataCache)
250 250
251 prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % item, cfgData, 1) 251 prefervar = cfgData.getVar('PREFERRED_PROVIDER_%s' % item, 1)
252 if prefervar: 252 if prefervar:
253 dataCache.preferred[item] = prefervar 253 dataCache.preferred[item] = prefervar
254 254
@@ -286,7 +286,7 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache):
286 pn = dataCache.pkg_fn[p] 286 pn = dataCache.pkg_fn[p]
287 provides = dataCache.pn_provides[pn] 287 provides = dataCache.pn_provides[pn]
288 for provide in provides: 288 for provide in provides:
289 prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % provide, cfgData, 1) 289 prefervar = cfgData.getVar('PREFERRED_PROVIDER_%s' % provide, 1)
290 logger.debug(1, "checking PREFERRED_PROVIDER_%s (value %s) against %s", provide, prefervar, pns.keys()) 290 logger.debug(1, "checking PREFERRED_PROVIDER_%s (value %s) against %s", provide, prefervar, pns.keys())
291 if prefervar in pns and pns[prefervar] not in preferred: 291 if prefervar in pns and pns[prefervar] not in preferred:
292 var = "PREFERRED_PROVIDER_%s = %s" % (provide, prefervar) 292 var = "PREFERRED_PROVIDER_%s = %s" % (provide, prefervar)