From 7a0cbe6b0e5185aebabedc515b427994bc2a15dc Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 19 Sep 2011 05:53:07 +0100 Subject: 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 --- bitbake/lib/bb/cooker.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bitbake') 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: # 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) -- cgit v1.2.3-54-g00ecf