From 93c0e9915b5c9bf8b0877c76f89de721adfbfd66 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Thu, 22 Dec 2011 19:01:35 -0600 Subject: package.bbclass: Adjust RPM call to use dynamic location for magic files The magic file could be installed somewhere else if the system native prefix settings are changed. Adjust the packaging files to compensate for this. Signed-off-by: Mark Hatle Signed-off-by: Richard Purdie --- meta/classes/package.bbclass | 2 +- meta/classes/package_rpm.bbclass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 39c1d4bc9..9040eb40b 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -1113,7 +1113,7 @@ if [ x"$D" = "x" ]; then fi } -RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps --macros ${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path ${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc' --rpmpopt ${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt" +RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps --macros ${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path ${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc' --rpmpopt ${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt" # Collect perfile run-time dependency metadata # Output: diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 93a4c3123..469526be7 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -941,7 +941,7 @@ python do_package_rpm () { d.setVar('PACKAGE_ARCH_EXTEND', package_arch) pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}', d) pkgarch = bb.data.expand('${PACKAGE_ARCH_EXTEND}${TARGET_VENDOR}-${TARGET_OS}', d) - magicfile = bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d) + magicfile = bb.data.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc', d) bb.mkdirhier(pkgwritedir) os.chmod(pkgwritedir, 0755) -- cgit v1.2.3