]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
providers.py: Correct PREFERRED_VERSION handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 31 May 2011 22:02:01 +0000 (23:02 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 31 May 2011 22:02:04 +0000 (23:02 +0100)
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>
lib/bb/providers.py

index dcba9ae255611a95332bca858070f41c0560e823..edd54d0c837c72b044a17906fd230f3563816429 100644 (file)
@@ -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: