Patchwork [1/1] package_rpm.bbclass: fix incremental rpm image generation

login
register
mail settings
Submitter Robert Yang
Date Sept. 5, 2012, 2:54 p.m.
Message ID <cfc2249ab533864f2716612838731e7831a1cb60.1346824226.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/35959/
State Accepted
Commit 2b3df2ec7979a49842df172be442a8794fe68fff
Headers show

Comments

Robert Yang - Sept. 5, 2012, 2:54 p.m.
* Check ${target_rootfs}/etc/passwd rather than
  ${target_rootfs}${rpmlibdir} to make sure that it has been previously
  installed.

* Remove the "--nodeps" when incremental image generation, it should
  take care of the dependencies. Still use "--replacefiles --replacepkgs" in
  case there are conflicts.

[YOCTO #3047]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/package_rpm.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 742f292..b2b8cee 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -191,7 +191,7 @@  rpm_update_pkg () {
 
         # Attempt to install the incremental pkgs
         if [ -s $installdir/incremental.manifest ]; then
-            rpm_common_comand --nodeps --replacefiles --replacepkgs \
+            rpm_common_comand --replacefiles --replacepkgs \
                -Uvh $installdir/incremental.manifest
         fi
     else
@@ -517,7 +517,7 @@  EOF
 			${target_rootfs}/install/original_solution_sorted.manifest > \
 			${target_rootfs}/install/diff.manifest
 		mv ${target_rootfs}/install/diff.manifest ${target_rootfs}/install/total_solution.manifest
-	elif [ "${INC_RPM_IMAGE_GEN}" = "1" -a -d "${target_rootfs}${rpmlibdir}" ]; then
+	elif [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "${target_rootfs}/etc/passwd" ]; then
 		echo "Skipping pre install due to existing image"
 	else
 		# RPM is special. It can't handle dependencies and preinstall scripts correctly. Its