From e5b3918bb9b334ad077213e8ea039789da440ee2 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Fri, 17 Jan 2014 17:58:05 +0000 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/buildinfohelper.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/ui') 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): def save_target_package_information(self, build_obj, target_obj, packagedict, pkgpnmap, recipes): for p in packagedict: - packagedict[p]['object'], created = Package.objects.get_or_create( build = build_obj, name = p ) + searchname = p + if 'OPKGN' in pkgpnmap[p].keys(): + searchname = pkgpnmap[p]['OPKGN'] + + packagedict[p]['object'], created = Package.objects.get_or_create( build = build_obj, name = searchname ) if created: # package was not build in the current build, but # fill in everything we can from the runtime-reverse package data try: packagedict[p]['object'].recipe = recipes[pkgpnmap[p]['PN']] packagedict[p]['object'].version = pkgpnmap[p]['PV'] + packagedict[p]['object'].installed_name = p packagedict[p]['object'].revision = pkgpnmap[p]['PR'] packagedict[p]['object'].license = pkgpnmap[p]['LICENSE'] packagedict[p]['object'].section = pkgpnmap[p]['SECTION'] @@ -209,9 +214,14 @@ class ORMWrapper(object): def save_build_package_information(self, build_obj, package_info, recipes): # create and save the object + pname = package_info['PKG'] + if 'OPKGN' in package_info.keys(): + pname = package_info['OPKGN'] + bp_object, created = Package.objects.get_or_create( build = build_obj, - name = package_info['PKG'] ) + name = pname ) + bp_object.installed_name = package_info['PKG'] bp_object.recipe = recipes[package_info['PN']] bp_object.version = package_info['PKGV'] bp_object.revision = package_info['PKGR'] -- cgit v1.2.3-54-g00ecf