diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-26 17:55:20 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-28 11:34:38 +0000 |
commit | 030d920e2db45fa924f868638b906422c731101b (patch) | |
tree | 286ea850aca6a83a94ee39531f45978c83634216 /bitbake/lib/bb/providers.py | |
parent | c679a3dd41db361212f8bb7c3d0227ff1b9d3011 (diff) | |
download | poky-030d920e2db45fa924f868638b906422c731101b.tar.gz |
bitbake: providers: Fix PREFERRED_VERSION lookup for '_' in PN
PN can contain '_', e.g. gcc-cross-x86_64 and an override cannot
hence we do this manually rather than use OVERRIDES.
(Bitbake rev: 7a6baf02617d1edced4eaff235e73d746e2a3b68)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/providers.py')
-rw-r--r-- | bitbake/lib/bb/providers.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py index 68c8d592d2..ffa532cff3 100644 --- a/bitbake/lib/bb/providers.py +++ b/bitbake/lib/bb/providers.py | |||
@@ -121,11 +121,14 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None): | |||
121 | preferred_file = None | 121 | preferred_file = None |
122 | preferred_ver = None | 122 | preferred_ver = None |
123 | 123 | ||
124 | localdata = data.createCopy(cfgData) | 124 | # pn can contain '_', e.g. gcc-cross-x86_64 and an override cannot |
125 | localdata.setVar('OVERRIDES', "%s:pn-%s:%s" % (data.getVar('OVERRIDES', localdata), pn, pn)) | 125 | # hence we do this manually rather than use OVERRIDES |
126 | bb.data.update_data(localdata) | 126 | preferred_v = cfgData.getVar("PREFERRED_VERSION_pn-%s" % pn, True) |
127 | if not preferred_v: | ||
128 | preferred_v = cfgData.getVar("PREFERRED_VERSION_%s" % pn, True) | ||
129 | if not preferred_v: | ||
130 | preferred_v = cfgData.getVar("PREFERRED_VERSION", True) | ||
127 | 131 | ||
128 | preferred_v = localdata.getVar('PREFERRED_VERSION', True) | ||
129 | if preferred_v: | 132 | if preferred_v: |
130 | m = re.match('(\d+:)*(.*)(_.*)*', preferred_v) | 133 | m = re.match('(\d+:)*(.*)(_.*)*', preferred_v) |
131 | if m: | 134 | if m: |