[2/2] package_rpm.bbclass: Avoid unnecessary installs in complementary pass

Submitted by Mark Hatle on Sept. 7, 2012, 10:05 p.m. | Patch ID: 36147


Message ID bc6aa4b508418cdb8e62ba4eb152b38527731b3b.1347055413.git.mark.hatle@windriver.com
State Accepted
Commit af9fd7566a5de4716a202922f5eabb13a412f2fb
Headers show

Commit Message

Mark Hatle Sept. 7, 2012, 10:05 p.m.
When called with the complementary install option, the first step is to
backup the install manifest so that we can avoid installing items previously
installed.  However, this backup process skipped the initial_install portion
of the manifest, causing early install items like libc6, bash, and base-files
to be installed a second time.

Fix this by cating the files to original_solution.  This is done as an append to
allow multiple calls to package_install_internal_rpm to work.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 meta/classes/package_rpm.bbclass |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 742f292..7e3dfbe 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -313,7 +313,14 @@  package_install_internal_rpm () {
-		mv ${target_rootfs}/install/total_solution.manifest ${target_rootfs}/install/original_solution.manifest
+		# We may run through the complementary installs multiple times.  For each time
+		# we should add the previous solution manifest to the full "original" set to
+		# avoid duplicate install steps.
+		echo "Update original solution..."
+		cat ${target_rootfs}/install/initial_solution.manifest >> ${target_rootfs}/install/original_solution.manifest
+		cat ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/original_solution.manifest
+		rm ${target_rootfs}/install/initial_solution.manifest
+		rm ${target_rootfs}/install/total_solution.manifest
 	# Setup manifest of packages to install...