[SCM] live-helper branch, debian-next, updated. debian/2.0_a9-1-3-g5c7a90b

Daniel Baumann daniel at debian.org
Fri Apr 2 15:53:16 UTC 2010


The following commit has been merged in the debian-next branch:
commit 5c7a90b00fc4a5c648163e7afc38aabd572e3c98
Author: Daniel Baumann <daniel at debian.org>
Date:   Fri Apr 2 17:48:03 2010 +0200

    Making handling of cache/packages_bootstrap a bit more error proove, thanks to Michal Suchanek <michal.suchanek at ruk.cuni.cz> for bringing it up.

diff --git a/helpers/binary_debian-installer b/helpers/binary_debian-installer
index 5c224ae..1cf79cd 100755
--- a/helpers/binary_debian-installer
+++ b/helpers/binary_debian-installer
@@ -415,14 +415,14 @@ then
 	if [ "${LH_DEBIAN_INSTALLER}" != "live" ]
 	then
 		# Including base debian packages
-		if [ -d cache/packages_bootstrap ]
+		if ls cache/packages_bootstrap/*.deb > /dev/null 2>&1
 		then
 			for FILE in cache/packages_bootstrap/*.deb
 			do
 				Install_file "${FILE}" "binary/pool/main"
 			done
 		else
-			Echo_error "Could not find cache/packages_bootstrap."
+			Echo_error "Could not find packages in cache/packages_bootstrap."
 			Echo_error "You selected values of LH_CACHE, LH_CACHE_PACKAGES, LH_CACHE_STAGES and LH_DEBIAN_INSTALLER which will result in 'bootstrap' packages not being cached - these are required when integrating the Debian Installer."
 			exit 1
 		fi
diff --git a/helpers/bootstrap_cdebootstrap b/helpers/bootstrap_cdebootstrap
index d37b0a5..11f77d3 100755
--- a/helpers/bootstrap_cdebootstrap
+++ b/helpers/bootstrap_cdebootstrap
@@ -123,7 +123,7 @@ if [ -x "/usr/bin/cdebootstrap" ] || [ -x "/usr/bin/cdebootstrap-static" ]
 then
 	if [ "${LH_CACHE_PACKAGES}" = "true" ]
 	then
-		if [ -d cache/packages_bootstrap ]
+		if ls cache/packages_bootstrap/*.deb > /dev/null 2>&1
 		then
 			mkdir -p chroot/var/cache/bootstrap
 			cp cache/packages_bootstrap/*.deb chroot/var/cache/bootstrap
@@ -138,14 +138,10 @@ then
 		fi
 
 		# Removing old cache
-		if [ -d cache/packages_bootstrap ]
-		then
-			rm -f cache/packages_bootstrap/*.deb
-		fi
+		rm -f cache/packages_bootstrap/*.deb
 
 		# Saving new cache
 		mkdir -p cache/packages_bootstrap
-
 		cp chroot/var/cache/bootstrap/*.deb cache/packages_bootstrap
 	fi
 
diff --git a/helpers/bootstrap_debootstrap b/helpers/bootstrap_debootstrap
index 2b708ba..d7662fa 100755
--- a/helpers/bootstrap_debootstrap
+++ b/helpers/bootstrap_debootstrap
@@ -116,7 +116,7 @@ if [ -x "/usr/sbin/debootstrap" ]
 then
 	if [ "${LH_CACHE_PACKAGES}" = "true" ]
 	then
-		if [ -d cache/packages_bootstrap ]
+		if ls cache/packages_bootstrap/*.deb > /dev/null 2>&1
 		then
 			mkdir -p chroot/var/cache/apt/archives
 			cp cache/packages_bootstrap/*.deb chroot/var/cache/apt/archives
@@ -131,14 +131,10 @@ then
 		fi
 
 		# Removing old cache
-		if [ -d cache/packages_bootstrap ]
-		then
-			rm -f cache/packages_bootstrap/*.deb
-		fi
+		rm -f cache/packages_bootstrap/*.deb
 
 		# Saving new cache
 		mkdir -p cache/packages_bootstrap
-
 		cp chroot/var/cache/apt/archives/*.deb cache/packages_bootstrap
 	fi
 

-- 
live-helper



More information about the debian-live-changes mailing list