diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-19 05:53:07 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-19 05:55:37 +0100 |
commit | 7a0cbe6b0e5185aebabedc515b427994bc2a15dc (patch) | |
tree | e2f8a6deab25d73fefebc470eb766613c8ba08b3 /bitbake | |
parent | 3a6a38e3c60600ac9272d9e73d1bf05c0ae7e3ae (diff) | |
download | poky-7a0cbe6b0e5185aebabedc515b427994bc2a15dc.tar.gz |
cooker.py: Fix key expansion issues in showVersions
bitbake -s was not displaying correct version information when the
PREFERRED_VERSION string contains other variables. The actual built
versions would differ since the providers.py functions were called
with expanded keys at this point.
This patch expands keys for showVersions bringing everything into
sync correctly.
[YOCTO #1493]
(Bitbake rev: 3a0f2dda3c6de993f08ed50e9d513add9407339c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index ff508f6b5e..9537239b03 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -244,13 +244,18 @@ class BBCooker: | |||
244 | # Need files parsed | 244 | # Need files parsed |
245 | self.updateCache() | 245 | self.updateCache() |
246 | 246 | ||
247 | # Need to ensure data store is expanded | ||
248 | localdata = data.createCopy(self.configuration.data) | ||
249 | bb.data.update_data(localdata) | ||
250 | bb.data.expandKeys(localdata) | ||
251 | |||
247 | pkg_pn = self.status.pkg_pn | 252 | pkg_pn = self.status.pkg_pn |
248 | preferred_versions = {} | 253 | preferred_versions = {} |
249 | latest_versions = {} | 254 | latest_versions = {} |
250 | 255 | ||
251 | # Sort by priority | 256 | # Sort by priority |
252 | for pn in pkg_pn: | 257 | for pn in pkg_pn: |
253 | (last_ver, last_file, pref_ver, pref_file) = bb.providers.findBestProvider(pn, self.configuration.data, self.status) | 258 | (last_ver, last_file, pref_ver, pref_file) = bb.providers.findBestProvider(pn, localdata, self.status) |
254 | preferred_versions[pn] = (pref_ver, pref_file) | 259 | preferred_versions[pn] = (pref_ver, pref_file) |
255 | latest_versions[pn] = (last_ver, last_file) | 260 | latest_versions[pn] = (last_ver, last_file) |
256 | 261 | ||