aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/providers.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-31 23:02:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-31 23:02:04 +0100
commit606f1acc6fb8ccec45d6a52ed6ae6dc128011402 (patch)
treed0deb52551e07ecdc9a2d698d7844d4073bf54e2 /lib/bb/providers.py
parent6c412f009e33e77cbcb5d4881c110e6bdda05282 (diff)
downloadbitbake-606f1acc6fb8ccec45d6a52ed6ae6dc128011402.tar.gz
providers.py: Correct PREFERRED_VERSION handling
Overrides on the right are the highest priority and in this case, pn-PN and PN should take priority over any other override so fix the code to do this. Also, since overrides will have been processed by bitbake, we shouldn't then be specifically looking up PREFERRED_VERSION_${PN} but just using PREFERRED_VERSION. This patch corrects the behaviours to match what the code is expected to do. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/providers.py')
-rw-r--r--lib/bb/providers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/providers.py b/lib/bb/providers.py
index dcba9ae25..edd54d0c8 100644
--- a/lib/bb/providers.py
+++ b/lib/bb/providers.py
@@ -84,10 +84,10 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
preferred_ver = None
localdata = data.createCopy(cfgData)
- bb.data.setVar('OVERRIDES', "pn-%s:%s:%s" % (pn, pn, data.getVar('OVERRIDES', localdata)), localdata)
+ bb.data.setVar('OVERRIDES', "%s:pn-%s:%s" % (data.getVar('OVERRIDES', localdata), pn, pn), localdata)
bb.data.update_data(localdata)
- preferred_v = bb.data.getVar('PREFERRED_VERSION_%s' % pn, localdata, True)
+ preferred_v = bb.data.getVar('PREFERRED_VERSION', localdata, True)
if preferred_v:
m = re.match('(\d+:)*(.*)(_.*)*', preferred_v)
if m: