summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-01-17 17:58:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-27 21:01:07 +0000
commite5b3918bb9b334ad077213e8ea039789da440ee2 (patch)
treeafec7eea7f6fd9cf855203df030d041778cf8e4e /bitbake/lib/bb/ui
parent9677275d0de94108689db300ca4637a2774ab2e3 (diff)
downloadpoky-e5b3918bb9b334ad077213e8ea039789da440ee2.tar.gz
bitbake: toaster: fix package data gathering
Under OE-Core, the name under which a package would be installed in a target may have been different than the name under it has been built or recorded in the dependencies listings. This patch addresses the way that Toaster records package names, and adds the field of "installed_name" to save the name under which a package have been installed in an image. (Bitbake rev: 24e0367429b248108b104ab5a2af05efcf7a8c39) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 3b4d7c9c10..0a8073f916 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -152,13 +152,18 @@ class ORMWrapper(object):
152 152
153 def save_target_package_information(self, build_obj, target_obj, packagedict, pkgpnmap, recipes): 153 def save_target_package_information(self, build_obj, target_obj, packagedict, pkgpnmap, recipes):
154 for p in packagedict: 154 for p in packagedict:
155 packagedict[p]['object'], created = Package.objects.get_or_create( build = build_obj, name = p ) 155 searchname = p
156 if 'OPKGN' in pkgpnmap[p].keys():
157 searchname = pkgpnmap[p]['OPKGN']
158
159 packagedict[p]['object'], created = Package.objects.get_or_create( build = build_obj, name = searchname )
156 if created: 160 if created:
157 # package was not build in the current build, but 161 # package was not build in the current build, but
158 # fill in everything we can from the runtime-reverse package data 162 # fill in everything we can from the runtime-reverse package data
159 try: 163 try:
160 packagedict[p]['object'].recipe = recipes[pkgpnmap[p]['PN']] 164 packagedict[p]['object'].recipe = recipes[pkgpnmap[p]['PN']]
161 packagedict[p]['object'].version = pkgpnmap[p]['PV'] 165 packagedict[p]['object'].version = pkgpnmap[p]['PV']
166 packagedict[p]['object'].installed_name = p
162 packagedict[p]['object'].revision = pkgpnmap[p]['PR'] 167 packagedict[p]['object'].revision = pkgpnmap[p]['PR']
163 packagedict[p]['object'].license = pkgpnmap[p]['LICENSE'] 168 packagedict[p]['object'].license = pkgpnmap[p]['LICENSE']
164 packagedict[p]['object'].section = pkgpnmap[p]['SECTION'] 169 packagedict[p]['object'].section = pkgpnmap[p]['SECTION']
@@ -209,9 +214,14 @@ class ORMWrapper(object):
209 214
210 def save_build_package_information(self, build_obj, package_info, recipes): 215 def save_build_package_information(self, build_obj, package_info, recipes):
211 # create and save the object 216 # create and save the object
217 pname = package_info['PKG']
218 if 'OPKGN' in package_info.keys():
219 pname = package_info['OPKGN']
220
212 bp_object, created = Package.objects.get_or_create( build = build_obj, 221 bp_object, created = Package.objects.get_or_create( build = build_obj,
213 name = package_info['PKG'] ) 222 name = pname )
214 223
224 bp_object.installed_name = package_info['PKG']
215 bp_object.recipe = recipes[package_info['PN']] 225 bp_object.recipe = recipes[package_info['PN']]
216 bp_object.version = package_info['PKGV'] 226 bp_object.version = package_info['PKGV']
217 bp_object.revision = package_info['PKGR'] 227 bp_object.revision = package_info['PKGR']