Skip to contentSkip to conversation

Enhancement / bug fixes to the complementary install

PATCH Applied Mark Hatle 2 participants 4 messages Sep 7, 2012 – Sep 12, 2012

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

cover Enhancement / bug fixes to the complementary install

This is one bug fix and one enhancement to the complementary install.

We have a use where we would like to call the complementary install directly with a set of parameters, the enhancement allows us to do this.

The bug fix is specific to the implementation within the RPM rootfs generation. Without the fix, a suboptimal installation is generated and performed.

The following changes since commit 0de1827a9601143b090f751ea702fdb65a936b77:

classes/mirrors: remove bogus gnutls mirror (2012-09-07 14:51:10 +0100)

are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mhatle/comp_install
http://git.yoctoproject.org/cgit.cgi//log/?h=mhatle/comp_install

Mark Hatle (2):
image.bbclass: Enable the complementary install to be called w/
globbing params
package_rpm.bbclass: Avoid unnecessary installs in complementary pass

 meta/classes/image.bbclass       |    4 +++-
 meta/classes/package_rpm.bbclass |    9 ++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.3.4
author
#1 lore raw

PATCH 1/2 image.bbclass: Enable the complementary install to be called w/ globbing params

If the image.bbclass is called with arguments, and these arguments are not "populate_sdk", they will be passed in as the expected GLOBS.

This enables external components and scripting to use the rootfs_install_complementary code.

---
 meta/classes/image.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
meta/classes/image.bbclass +3 -1
index 2e95556..9433d48 100644
@@ -329,8 +329,10 @@ rootfs_install_complementary() {
     list_installed_packages arch > ${WORKDIR}/installed_pkgs.txt
 
     # Apply the globs to all the packages currently installed
-    if [ "$1" = "populate_sdk" ] ; then
+    if [ -n "$1" -a "$1" = "populate_sdk" ] ; then
         GLOBS="${SDKIMAGE_INSTALL_COMPLEMENTARY}"
+    elif [ -n "$1" ]; then
+        GLOBS="$@"
     else
         GLOBS="${IMAGE_INSTALL_COMPLEMENTARY}"
         # Add locales
Signature · 1 line
1.7.3.4
author
#2 lore raw

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

In reply to Mark Hatle

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.

---
 meta/classes/package_rpm.bbclass |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
meta/classes/package_rpm.bbclass +8 -1
index 742f292..7e3dfbe 100644
@@ -313,7 +313,14 @@ package_install_internal_rpm () {
 			done
 		fi
 	else
-		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
 	fi
 
 	# Setup manifest of packages to install...
Signature · 1 line
1.7.3.4
Applied
#3 lore raw
In reply to Mark Hatle
Quoted 16 lines · Mark Hatle

This is one bug fix and one enhancement to the complementary install.

We have a use where we would like to call the complementary install directly with a set of parameters, the enhancement allows us to do this.

The bug fix is specific to the implementation within the RPM rootfs generation. Without the fix, a suboptimal installation is generated and performed.

The following changes since commit 0de1827a9601143b090f751ea702fdb65a936b77:

   classes/mirrors: remove bogus gnutls mirror (2012-09-07 14:51:10 +0100)

are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mhatle/comp_install
http://git.yoctoproject.org/cgit.cgi//log/?h=mhatle/comp_install

Quoted 9 lines

Mark Hatle (2):
image.bbclass: Enable the complementary install to be called w/
globbing params
package_rpm.bbclass: Avoid unnecessary installs in complementary pass

  meta/classes/image.bbclass       |    4 +++-
  meta/classes/package_rpm.bbclass |    9 ++++++++-
  2 files changed, 11 insertions(+), 2 deletions(-)

Merged into OE-Core

Thanks
Sau!