[OE-core] [PATCH v7] rootfs: Modify RPM installation

David Vincent freesilicon at gmail.com
Tue Jan 17 09:00:08 UTC 2017


On lundi 16 janvier 2017 17:39:45 CET Burton, Ross wrote:
> On 12 January 2017 at 09:08, David Vincent <freesilicon at gmail.com> wrote:
> > When using a custom RPM data directory instead of the default dir
> > '/var/lib/rpm', the final image did not contain any of the database
> > files in the expected location. This commit takes into account the
> > 'rpmlibdir' variable set into 'rootfs_rpm.bbclass'.
> 
> Something changed and this is now breaking rootfs generation for me:

It becomes weirder and weirder...

> 
> File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
>      0001:
>  *** 0002:license_create_manifest(d)
>      0003:
> File:
> '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64/build/meta/cl
> asses/license.bbclass', lineno: 48, function: license_create_manifest
>      0044:    pkg_dic = {}
>      0045:    for pkg in sorted(image_list_installed_packages(d)):
>      0046:        pkg_info = os.path.join(d.getVar('PKGDATA_DIR'),
>      0047:                                'runtime-reverse', pkg)
>  *** 0048:        pkg_name = os.path.basename(os.readlink(pkg_info))
>      0049:
>      0050:        pkg_dic[pkg_name] =
> oe.packagedata.read_pkgdatafile(pkg_info)
>      0051:        if not "LICENSE" in pkg_dic[pkg_name].keys():
>      0052:            pkg_lic_name = "LICENSE_" + pkg_name
> Exception: FileNotFoundError: [Errno 2] No such file or directory:
> '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64/build/build/t
> mp/sysroots/qemux86-64/pkgdata/runtime-reverse/error:'
> 
> Note how pkg is set to "error:".

I found that the RpmPkgsList is also using 'rpmlibdir'. Could it be possible 
that it must be defined for class-native and class-target ? Therefore, maybe 
setting a default value in each case could solve the problem ?
I'm using this patch on a daily basis and I don't have problems but, in my 
case, I set a default value for rpmlibdir at the distro level which I override 
for class-target in some of my BSP layers.

I can fall back to v6 and set a default value using a weak assignment for 
rpmlibdir.

> 
> Clearly the error handling in image_list_installed_packages() needs work,
> but I can make this problem appear/disappear by adding/removing this patch.
> 
> Ross

David



More information about the Openembedded-core mailing list