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>
This commit is contained in:
Richard Purdie 2011-09-19 05:53:07 +01:00
parent 3a6a38e3c6
commit 7a0cbe6b0e
1 changed files with 6 additions and 1 deletions

View File

@ -244,13 +244,18 @@ class BBCooker:
# Need files parsed
self.updateCache()
# Need to ensure data store is expanded
localdata = data.createCopy(self.configuration.data)
bb.data.update_data(localdata)
bb.data.expandKeys(localdata)
pkg_pn = self.status.pkg_pn
preferred_versions = {}
latest_versions = {}
# Sort by priority
for pn in pkg_pn:
(last_ver, last_file, pref_ver, pref_file) = bb.providers.findBestProvider(pn, self.configuration.data, self.status)
(last_ver, last_file, pref_ver, pref_file) = bb.providers.findBestProvider(pn, localdata, self.status)
preferred_versions[pn] = (pref_ver, pref_file)
latest_versions[pn] = (last_ver, last_file)