From 76ef414b8a017557cf5f3ad7b3ca8a324f7aad29 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Mon, 23 Jul 2012 22:42:24 +0100 Subject: package.bbclass: Create symlinks for packages with different packaged name While generating license.manifest package information is searched in: filename=`ls ${TMPDIR}/pkgdata/*/runtime/${pkg}| head -1` This is ok as long as package name is the same as the package name after packaging. For example dbus is packaged as dbus-1. So, searching ls ${TMPDIR}/pkgdata/*/runtime/dbus-1 will fail because there is no file with this package name. Create a symlink to the pkgdata file in a runtime-reverse directory so that these reverse lookups are possible. Fixes [YOCTO #2638]. Signed-off-by: Andrei Gherzan Signed-off-by: Paul Eggleton Signed-off-by: Saul Wold --- meta/classes/package.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta/classes/package.bbclass') diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index fc834242da..ea199d33bd 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -1124,6 +1124,10 @@ python emit_pkgdata() { sf.write('%s_%s: %s\n' % ('PKGSIZE', pkg, get_directory_size(pkgdest + "/%s" % pkg))) sf.close() + # Symlinks needed for reverse lookups (from the final package name) + pkgval = d.getVar('PKG_%s' % (pkg), True) + subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval + oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True) allow_empty = d.getVar('ALLOW_EMPTY_%s' % pkg, True) if not allow_empty: @@ -1137,7 +1141,7 @@ python emit_pkgdata() { bb.utils.unlockfile(lf) } -emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime" +emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse" ldconfig_postinst_fragment() { if [ x"$D" = "x" ]; then -- cgit v1.2.3