[SCM] debian-live branch, master, updated. 1.0_a47-1-31-g2b77ec6

Chris Lamb chris at chris-lamb.co.uk
Sun Jun 15 03:51:34 UTC 2008


The following commit has been merged in the master branch:
commit 0cfbc69eb0d6559b7ea334448f5eb4178bfbfd95
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date:   Sun Jun 15 02:55:33 2008 +0100

    Ensure apt-utils is installed in the helpers it is required.
    
    This allows us to remove a hacky test from hooks/minimal to see whether
    we need the package.
    
    Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>

diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index d0f6d20..7ee6dfd 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -73,6 +73,7 @@ Create_lockfile .lock
 
 # Checking depends
 Check_package chroot/usr/bin/wget wget
+Check_package chroot/usr/bin/apt-ftparchive apt-utils
 
 # Restoring cache
 Restore_cache cache/packages_binary
diff --git a/helpers/lh_binary_local-packageslists b/helpers/lh_binary_local-packageslists
index 5b8927a..2659416 100755
--- a/helpers/lh_binary_local-packageslists
+++ b/helpers/lh_binary_local-packageslists
@@ -44,6 +44,15 @@ Create_lockfile .lock
 
 if ls config/binary_local-packageslists/* > /dev/null 2>&1
 then
+	# Restoring cache
+	Restore_cache cache/packages_chroot
+
+	# Check depends
+	Check_package chroot/usr/bin/apt-ftparchive apt-utils
+
+	# Installing depends
+	Install_package
+
 	mkdir -p chroot/binary.deb/archives/partial
 	mv chroot/var/lib/dpkg/status chroot/var/lib/dpkg/status.tmp
 	touch chroot/var/lib/dpkg/status
@@ -95,6 +104,12 @@ then
 	rm -rf chroot/binary.deb
 	mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status
 
+	# Removing depends
+	Remove_package
+
+	# Saving cache
+	Save_cache cache/packages_chroot
+
 	# Creating stage file
 	Create_stagefile .stage/binary_local-packageslists
 fi
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index 677b50f..981692b 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -96,6 +96,15 @@ case "${1}" in
 
 			if ls chroot/root/local-packages/*.deb > /dev/null 2>&1
 			then
+				# Restoring cache
+				Restore_cache cache/packages_chroot
+
+				# Check depends
+				Check_package chroot/usr/bin/apt-ftparchive apt-utils
+
+				# Installing depends
+				Install_package
+
 				# Generate Packages.gz
 				echo "cd /root/local-packages && apt-ftparchive packages . > Packages" | Chroot sh
 				gzip -9 chroot/root/local-packages/Packages
@@ -104,6 +113,12 @@ case "${1}" in
 				echo "" >> chroot/etc/apt/sources.list
 				echo "# Local packages" >> chroot/etc/apt/sources.list
 				echo "deb file:/root/local-packages ./" >> chroot/etc/apt/sources.list
+
+				# Removing depends
+				Remove_package
+
+				# Saving cache
+				Save_cache cache/packages_chroot
 			else
 				Echo_warning "Local packages must be named with suffix '_all.deb' or '_\$architecture.deb'."
 			fi
diff --git a/hooks/minimal b/hooks/minimal
index f081fcc..ff02ddc 100755
--- a/hooks/minimal
+++ b/hooks/minimal
@@ -9,27 +9,15 @@
 
 set -e
 
-Purge() {
-	PACKAGE="${1}"
-
+# Removing unused packages
+for PACKAGE in apt-utils aptitude man-db manpages info wget
+do
 	if ! apt-get remove --purge --yes "${PACKAGE}"
 	then
 		echo "WARNING: ${PACKAGE} isn't installed"
 	fi
-}
-
-# Removing unused packages
-for PACKAGE in aptitude man-db manpages info wget
-do
-	Purge ${PACKAGE}
 done
 
-# Remove apt-utils if we do not require it for lh_chroot_sources
-if [ ! -e chroot/root/local-packages/Packages.gz ]
-then
-	Purge apt-utils
-fi
-
 apt-get autoremove --yes || true
 
 # Removing unused files

-- 
debian-live



More information about the debian-live-changes mailing list