diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-31 23:02:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-01 14:08:25 +0100 |
commit | dc65caa889dc384334c77d229e2754ed96380e64 (patch) | |
tree | a92453aae57c3f932f1a708b8aabe7e202f58c73 /bitbake | |
parent | 52295fa3deef3b0374b99829626d524cefae6001 (diff) | |
download | poky-dc65caa889dc384334c77d229e2754ed96380e64.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.
(Bitbake rev: 606f1acc6fb8ccec45d6a52ed6ae6dc128011402)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/providers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py index dcba9ae255..edd54d0c83 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', "pn-%s:%s:%s" % (pn, pn, data.getVar('OVERRIDES', localdata)), localdata) | 87 | bb.data.setVar('OVERRIDES', "%s:pn-%s:%s" % (data.getVar('OVERRIDES', localdata), pn, pn), localdata) |
88 | bb.data.update_data(localdata) | 88 | bb.data.update_data(localdata) |
89 | 89 | ||
90 | preferred_v = bb.data.getVar('PREFERRED_VERSION_%s' % pn, localdata, True) | 90 | preferred_v = bb.data.getVar('PREFERRED_VERSION', localdata, 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: |