From aa760ff7dee4029c30c9de9fc0b640149e4a4c77 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Thu, 21 Feb 2013 17:18:29 -0600 Subject: rootfs_rpm.bbclass: Handle multilib configures with different OS values [ CQID: WIND00404082 ] It is possible for the TARGET_OS to change dependending on the multilib used for a given package build. mips64 has two potential TARGET_OS values: linux and linux-gnun32. The RPM and Smart setup needs to distinguish between the two otherwise packages of the "non-default" TARGET_OS may be ignored as incompatible. Signed-off-by: Mark Hatle Signed-off-by: Richard Purdie --- meta/classes/package_rpm.bbclass | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) (limited to 'meta/classes/package_rpm.bbclass') diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index dac89a79cd..7a1da33ead 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -248,8 +248,6 @@ translate_oe_to_smart() { package_install_internal_rpm () { local target_rootfs="$INSTALL_ROOTFS_RPM" - local platform="`echo $INSTALL_PLATFORM_RPM | sed 's#-#_#g'`" - local platform_extra="`echo $INSTALL_PLATFORM_EXTRA_RPM | sed 's#-#_#g'`" local package_to_install="$INSTALL_PACKAGES_RPM" local package_attemptonly="$INSTALL_PACKAGES_ATTEMPTONLY_RPM" local package_linguas="$INSTALL_PACKAGES_LINGUAS_RPM" @@ -273,29 +271,17 @@ package_install_internal_rpm () { # Setup base system configuration echo "Note: configuring RPM platform settings" mkdir -p ${target_rootfs}/etc/rpm/ - if [ -n "${sdk_mode}" ]; then - platform_vendor="${SDK_VENDOR}" - platform_os="${SDK_OS}" - else - platform_vendor="${TARGET_VENDOR}" - platform_os="${TARGET_OS}" - fi - - echo "${platform}${platform_vendor}-${platform_os}" > ${target_rootfs}/etc/rpm/platform + echo "$INSTALL_PLATFORM_RPM" > ${target_rootfs}/etc/rpm/platform - - if [ ! -z "$platform_extra" ]; then - for pt in $platform_extra ; do + if [ ! -z "$INSTALL_PLATFORM_EXTRA_RPM" ]; then + for pt in $INSTALL_PLATFORM_EXTRA_RPM ; do channel_priority=$(expr $channel_priority + 5) case $pt in - noarch | any | all) - os="`echo ${platform_os} | sed "s,-.*,,"`.*" - ;; - *) - os="${platform_os}" + noarch-* | any-* | all-*) + pt=$(echo $pt | sed "s,-linux.*$,-linux\.*,") ;; esac - echo "$pt-.*-$os" >> ${target_rootfs}/etc/rpm/platform + echo "$pt" >> ${target_rootfs}/etc/rpm/platform done fi @@ -360,12 +346,13 @@ EOF smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._tmppath=/install/tmp # Optional debugging #smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-log-level=debug + #smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-log-file=/tmp/smart-debug-logfile # Delay this until later... #smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y - platform_extra_fixed=`echo "$platform_extra" | tr - _` - for arch in $platform_extra_fixed ; do + for canonical_arch in $INSTALL_PLATFORM_EXTRA_RPM; do + arch=$(echo $canonical_arch | sed "s,\([^-]*\)-.*,\1,") if [ -d ${DEPLOY_DIR_RPM}/$arch -a ! -e ${target_rootfs}/install/channel.$arch.stamp ] ; then echo "Note: adding Smart channel $arch ($channel_priority)" smart --data-dir=${target_rootfs}/var/lib/smart channel --add $arch type=rpm-md type=rpm-md baseurl=${DEPLOY_DIR_RPM}/$arch -y -- cgit 1.2.3-korg