mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
9677275d0d
commit
e5b3918bb9
@@ -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
|
||||
bp_object, created = Package.objects.get_or_create( build = build_obj,
|
||||
name = package_info['PKG'] )
|
||||
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 = 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']
|
||||
|
||||
Reference in New Issue
Block a user