[SCM] live-build branch, debian, updated. debian/3.0_a60-1-10-gf735d98

Daniel Baumann daniel at debian.org
Sun Sep 30 07:47:33 UTC 2012


The following commit has been merged in the debian branch:
commit cab0d9e783ef18c334a09e0f1aa141dec0687978
Author: Colin Watson <cjwatson at ubuntu.com>
Date:   Sun Sep 30 09:33:06 2012 +0200

    If --build-with-chroot is false, run ! lines in package-lists in the host system.

diff --git a/functions/packagelists.sh b/functions/packagelists.sh
index 8a6141b..aad1ea2 100755
--- a/functions/packagelists.sh
+++ b/functions/packagelists.sh
@@ -43,7 +43,15 @@ Expand_packagelist ()
 				\!*)
 					_EXEC="$(echo ${_LB_LINE} | sed -e 's|^!||')"
 
-					chroot chroot ${_EXEC}
+					case "${LB_BUILD_WITH_CHROOT}" in
+						true)
+							chroot chroot sh -c "${_EXEC}"
+							;;
+
+						false)
+							eval ${_EXEC}
+							;;
+					esac
 					;;
 
 				\#if\ *)
diff --git a/scripts/build/binary_package-lists b/scripts/build/binary_package-lists
index 8671678..ce459ab 100755
--- a/scripts/build/binary_package-lists
+++ b/scripts/build/binary_package-lists
@@ -41,15 +41,33 @@ Create_lockfile .lock
 if ls config/package-lists/*.list > /dev/null 2>&1 || \
    ls config/package-lists/*.list.binary > /dev/null 2>&1
 then
-	# Restoring cache
-	Restore_cache cache/packages.chroot
-
-	# Check depends
-	Check_package chroot/usr/bin/apt-ftparchive apt-utils
-	Check_package chroot/usr/bin/grep-aptavail dctrl-tools
-
-	# Installing depends
-	Install_package
+	case "${LB_BUILD_WITH_CHROOT}" in
+		true)
+			# Restoring cache
+			Restore_cache cache/packages.chroot
+
+			# Check depends
+			Check_package chroot/usr/bin/apt-ftparchive apt-utils
+			Check_package chroot/usr/bin/grep-aptavail dctrl-tools
+
+			# Installing depends
+			Install_package
+			;;
+
+		false)
+			if [ ! -e /usr/bin/apt-ftparchive ]; then
+				# apt-utils
+				Echo_error "/usr/bin/apt-ftparchive - no such file."
+				exit 1
+			fi
+
+			if [ ! -e /usr/bin/grep-aptavail ]; then
+				# dctrl-tools
+				Echo_error "/usr/bin/grep-aptavail - no such file."
+				exit 1
+			fi
+			;;
+	esac
 
 	if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
 	then
@@ -133,11 +151,15 @@ then
 	rm -rf chroot/binary.deb
 	mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status
 
-	# Removing depends
-	Remove_package
+	case "${LB_BUILD_WITH_CHROOT}" in
+		true)
+			# Removing depends
+			Remove_package
 
-	# Saving cache
-	Save_cache cache/packages.chroot
+			# Saving cache
+			Save_cache cache/packages.chroot
+			;;
+	esac
 
 	# Creating stage file
 	Create_stagefile .build/binary_package-lists
diff --git a/scripts/build/chroot_package-lists b/scripts/build/chroot_package-lists
index b85c000..8a7f2e7 100755
--- a/scripts/build/chroot_package-lists
+++ b/scripts/build/chroot_package-lists
@@ -46,14 +46,26 @@ if ls config/package-lists/*.list > /dev/null 2>&1 || \
    ls config/package-lists/*.list.chroot > /dev/null 2>&1 || \
    ls config/package-lists/*.list.chroot_${_PASS} > /dev/null 2>&1
 then
-	# Checking depends
-	Check_package chroot/usr/bin/grep-aptavail dctrl-tools
-
-	# Restoring cache
-	Restore_cache cache/packages.chroot
-
-	# Installing depends
-	Install_package
+	case "${LB_BUILD_WITH_CHROOT}" in
+		true)
+			# Checking depends
+			Check_package chroot/usr/bin/grep-aptavail dctrl-tools
+
+			# Restoring cache
+			Restore_cache cache/packages.chroot
+
+			# Installing depends
+			Install_package
+			;;
+
+		false)
+			if [ ! -e /usr/bin/grep-aptavail ]; then
+				# dctrl-tools
+				Echo_error "/usr/bin/grep-aptavail - no such file."
+				exit 1
+			fi
+			;;
+	esac
 
 	if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
 	then
@@ -76,15 +88,19 @@ then
 
 	rm -f chroot/bin/Packages
 
-	# Removing dctrl-tools again if the user has not installed it
-	if ! grep -qs dctrl-tools chroot/root/packages.chroot
-	then
-		# Removing depends
-		Remove_package
-	fi
-
-	# Saving cache
-	Save_cache cache/packages.binary
+	case "${LB_BUILD_WITH_CHROOT}" in
+		true)
+			# Removing dctrl-tools again if the user has not installed it
+			if ! grep -qs dctrl-tools chroot/root/packages.chroot
+			then
+				# Removing depends
+				Remove_package
+			fi
+
+			# Saving cache
+			Save_cache cache/packages.binary
+			;;
+	esac
 
 	# Creating stage file
 	Create_stagefile .build/chroot_package-lists.${_PASS}

-- 
live-build



More information about the debian-live-changes mailing list