summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass31
1 files changed, 9 insertions, 22 deletions
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() {
248package_install_internal_rpm () { 248package_install_internal_rpm () {
249 249
250 local target_rootfs="$INSTALL_ROOTFS_RPM" 250 local target_rootfs="$INSTALL_ROOTFS_RPM"
251 local platform="`echo $INSTALL_PLATFORM_RPM | sed 's#-#_#g'`"
252 local platform_extra="`echo $INSTALL_PLATFORM_EXTRA_RPM | sed 's#-#_#g'`"
253 local package_to_install="$INSTALL_PACKAGES_RPM" 251 local package_to_install="$INSTALL_PACKAGES_RPM"
254 local package_attemptonly="$INSTALL_PACKAGES_ATTEMPTONLY_RPM" 252 local package_attemptonly="$INSTALL_PACKAGES_ATTEMPTONLY_RPM"
255 local package_linguas="$INSTALL_PACKAGES_LINGUAS_RPM" 253 local package_linguas="$INSTALL_PACKAGES_LINGUAS_RPM"
@@ -273,29 +271,17 @@ package_install_internal_rpm () {
273 # Setup base system configuration 271 # Setup base system configuration
274 echo "Note: configuring RPM platform settings" 272 echo "Note: configuring RPM platform settings"
275 mkdir -p ${target_rootfs}/etc/rpm/ 273 mkdir -p ${target_rootfs}/etc/rpm/
276 if [ -n "${sdk_mode}" ]; then 274 echo "$INSTALL_PLATFORM_RPM" > ${target_rootfs}/etc/rpm/platform
277 platform_vendor="${SDK_VENDOR}"
278 platform_os="${SDK_OS}"
279 else
280 platform_vendor="${TARGET_VENDOR}"
281 platform_os="${TARGET_OS}"
282 fi
283
284 echo "${platform}${platform_vendor}-${platform_os}" > ${target_rootfs}/etc/rpm/platform
285 275
286 276 if [ ! -z "$INSTALL_PLATFORM_EXTRA_RPM" ]; then
287 if [ ! -z "$platform_extra" ]; then 277 for pt in $INSTALL_PLATFORM_EXTRA_RPM ; do
288 for pt in $platform_extra ; do
289 channel_priority=$(expr $channel_priority + 5) 278 channel_priority=$(expr $channel_priority + 5)
290 case $pt in 279 case $pt in
291 noarch | any | all) 280 noarch-* | any-* | all-*)
292 os="`echo ${platform_os} | sed "s,-.*,,"`.*" 281 pt=$(echo $pt | sed "s,-linux.*$,-linux\.*,")
293 ;;
294 *)
295 os="${platform_os}"
296 ;; 282 ;;
297 esac 283 esac
298 echo "$pt-.*-$os" >> ${target_rootfs}/etc/rpm/platform 284 echo "$pt" >> ${target_rootfs}/etc/rpm/platform
299 done 285 done
300 fi 286 fi
301 287
@@ -360,12 +346,13 @@ EOF
360 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._tmppath=/install/tmp 346 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._tmppath=/install/tmp
361 # Optional debugging 347 # Optional debugging
362 #smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-log-level=debug 348 #smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-log-level=debug
349 #smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-log-file=/tmp/smart-debug-logfile
363 350
364 # Delay this until later... 351 # Delay this until later...
365 #smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y 352 #smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y
366 353
367 platform_extra_fixed=`echo "$platform_extra" | tr - _` 354 for canonical_arch in $INSTALL_PLATFORM_EXTRA_RPM; do
368 for arch in $platform_extra_fixed ; do 355 arch=$(echo $canonical_arch | sed "s,\([^-]*\)-.*,\1,")
369 if [ -d ${DEPLOY_DIR_RPM}/$arch -a ! -e ${target_rootfs}/install/channel.$arch.stamp ] ; then 356 if [ -d ${DEPLOY_DIR_RPM}/$arch -a ! -e ${target_rootfs}/install/channel.$arch.stamp ] ; then
370 echo "Note: adding Smart channel $arch ($channel_priority)" 357 echo "Note: adding Smart channel $arch ($channel_priority)"
371 smart --data-dir=${target_rootfs}/var/lib/smart channel --add $arch type=rpm-md type=rpm-md baseurl=${DEPLOY_DIR_RPM}/$arch -y 358 smart --data-dir=${target_rootfs}/var/lib/smart channel --add $arch type=rpm-md type=rpm-md baseurl=${DEPLOY_DIR_RPM}/$arch -y