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.bbclass48
1 files changed, 47 insertions, 1 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index b80b93912c..cb8e0f42e6 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -348,7 +348,8 @@ EOF
348 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-noparentdirs=1 348 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-noparentdirs=1
349 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._var=${localstatedir} 349 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._var=${localstatedir}
350 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._tmppath=/install/tmp 350 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._tmppath=/install/tmp
351 smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y 351 # Delay this until later...
352 #smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y
352 353
353 platform_extra_fixed=`echo "$platform_extra" | tr - _` 354 platform_extra_fixed=`echo "$platform_extra" | tr - _`
354 for arch in $platform_extra_fixed ; do 355 for arch in $platform_extra_fixed ; do
@@ -398,6 +399,51 @@ EOF
398 # Determine what to install 399 # Determine what to install
399 translate_oe_to_smart ${sdk_mode} ${package_to_install} ${package_linguas} 400 translate_oe_to_smart ${sdk_mode} ${package_to_install} ${package_linguas}
400 401
402 # If incremental install, we need to determine what we've got,
403 # what we need to add, and what to remove...
404 if [ "${INC_RPM_IMAGE_GEN}" = "1" -a "${INSTALL_COMPLEMENTARY_RPM}" != "1" ]; then
405 # Dump the new solution
406 echo "Note: creating install solution for incremental install"
407 smart --data-dir=${target_rootfs}/var/lib/smart install -y --dump ${pkgs_to_install} 2> ${target_rootfs}/../solution.manifest
408 fi
409
410 if [ "${INSTALL_COMPLEMENTARY_RPM}" != "1" ]; then
411 echo "Note: adding Smart RPM DB channel"
412 smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y
413 fi
414
415 # If incremental install, we need to determine what we've got,
416 # what we need to add, and what to remove...
417 if [ "${INC_RPM_IMAGE_GEN}" = "1" -a "${INSTALL_COMPLEMENTARY_RPM}" != "1" ]; then
418 # First upgrade everything that was previously installed to the latest version
419 echo "Note: incremental update -- upgrade packages in place"
420 smart --data-dir=${target_rootfs}/var/lib/smart upgrade
421
422 # Dump what is already installed
423 echo "Note: dump installed packages for incremental update"
424 smart --data-dir=${target_rootfs}/var/lib/smart query --installed --output ${target_rootfs}/../installed.manifest
425
426 sort ${target_rootfs}/../installed.manifest > ${target_rootfs}/../installed.manifest.sorted
427 sort ${target_rootfs}/../solution.manifest > ${target_rootfs}/../solution.manifest.sorted
428
429 comm -1 -3 ${target_rootfs}/../solution.manifest.sorted ${target_rootfs}/../installed.manifest.sorted \
430 > ${target_rootfs}/../remove.list
431 comm -2 -3 ${target_rootfs}/../solution.manifest.sorted ${target_rootfs}/../installed.manifest.sorted \
432 > ${target_rootfs}/../install.list
433
434 pkgs_to_remove=`cat ${target_rootfs}/../remove.list | xargs echo`
435 pkgs_to_install=`cat ${target_rootfs}/../install.list | xargs echo`
436
437 echo "Note: to be removed: ${pkgs_to_remove}"
438
439 for pkg in ${pkgs_to_remove}; do
440 echo "Debug: What required: $pkg"
441 smart --data-dir=${target_rootfs}/var/lib/smart query $pkg --show-requiredby
442 done
443
444 [ -n "$pkgs_to_remove" ] && smart --data-dir=${target_rootfs}/var/lib/smart remove -y ${pkgs_to_remove}
445 fi
446
401 echo "Note: to be installed: ${pkgs_to_install}" 447 echo "Note: to be installed: ${pkgs_to_install}"
402 [ -n "$pkgs_to_install" ] && smart --data-dir=${target_rootfs}/var/lib/smart install -y ${pkgs_to_install} 448 [ -n "$pkgs_to_install" ] && smart --data-dir=${target_rootfs}/var/lib/smart install -y ${pkgs_to_install}
403 449