[SCM] live-build branch, debian, updated. debian/3.0_a20-1

Daniel Baumann daniel at debian.org
Sat Jun 11 15:50:14 UTC 2011


The following commit has been merged in the debian branch:
commit 238ae93f4194dd6c43a146cb4e8d87825a4702f0
Author: Daniel Baumann <daniel at debian.org>
Date:   Sat Jun 11 16:36:44 2011 +0200

    Allow to optionally run package installation in two passes. Eventually, this allows to have media containing a 'bigger' live system that what they end up installing (Closes: #627439).

diff --git a/scripts/build/lb_binary_manifest b/scripts/build/lb_binary_manifest
index 0ae9051..e80d780 100755
--- a/scripts/build/lb_binary_manifest
+++ b/scripts/build/lb_binary_manifest
@@ -61,10 +61,9 @@ case "${LB_INITRAMFS}" in
 esac
 
 # Add filesystem.packages
-Chroot chroot "dpkg-query -W" > binary/"${INITFS}"/filesystem.${SUFFIX}
-
-# Copy manifest as build output.
-cp binary/"${INITFS}"/filesystem.${SUFFIX} binary.${SUFFIX}
+cp binary.packages.live "binary/${INITFS}/filesystem.${SUFFIX}"
+echo "$(diff binary.packages.live binary.packages.install | awk '/^< / { print $2 }')" \
+	> "binary/${INITFS}/filesystem.${SUFFIX}-remove"
 
 # Creating stage file
 Create_stagefile .stage/binary_manifest
diff --git a/scripts/build/lb_chroot b/scripts/build/lb_chroot
index 0b9e39f..eb4781d 100755
--- a/scripts/build/lb_chroot
+++ b/scripts/build/lb_chroot
@@ -55,11 +55,18 @@ lb chroot_sources install ${*}
 lb chroot_linux-image ${*}
 lb chroot_preseed ${*}
 lb chroot_local-preseed ${*}
-lb chroot_packagelists ${*}
-lb chroot_local-packagelists ${*}
-lb chroot_local-packages ${*}
-lb chroot_install-packages ${*}
-lb chroot_local-tasklists ${*}
+
+for _PASS in install live
+do
+	lb chroot_packagelists ${_PASS} ${*}
+	lb chroot_local-packagelists ${_PASS} ${*}
+	lb chroot_local-packages ${_PASS} ${*}
+	lb chroot_install-packages ${_PASS} ${*}
+	lb chroot_local-tasklists ${_PASS} ${*}
+
+	Chroot chroot "dpkg-query -W" > binary.packages.${_PASS}
+done
+
 lb chroot_local-includes ${*}
 lb chroot_local-patches ${*}
 lb chroot_local-hooks ${*}
diff --git a/scripts/build/lb_chroot_install-packages b/scripts/build/lb_chroot_install-packages
index a0e2684..cd3c178 100755
--- a/scripts/build/lb_chroot_install-packages
+++ b/scripts/build/lb_chroot_install-packages
@@ -17,6 +17,10 @@ set -e
 DESCRIPTION="$(Echo 'install queued packages into chroot')"
 HELP=""
 USAGE="${PROGRAM} [--force]"
+USAGE="${PROGRAM} {install|live} [--force]"
+
+_PASS="${1}"
+shift
 
 Arguments "${@}"
 
@@ -24,13 +28,13 @@ Arguments "${@}"
 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
 Set_defaults
 
-Echo_message "Begin installing packages..."
+Echo_message "Begin installing packages (${_PASS} pass)..."
 
 # Requiring stage file
 Require_stagefile .stage/config .stage/bootstrap
 
 # Checking stage file
-Check_stagefile .stage/chroot_install-packages
+Check_stagefile .stage/chroot_install-packages.${PASS}
 
 # Checking lock file
 Check_lockfile .lock
@@ -63,4 +67,4 @@ then
 fi
 
 # Creating stage file
-Create_stagefile .stage/chroot_install-packages
+Create_stagefile .stage/chroot_install-packages.${_PASS}
diff --git a/scripts/build/lb_chroot_local-packagelists b/scripts/build/lb_chroot_local-packagelists
index 2f1da90..20566e9 100755
--- a/scripts/build/lb_chroot_local-packagelists
+++ b/scripts/build/lb_chroot_local-packagelists
@@ -16,7 +16,10 @@ set -e
 # Setting static variables
 DESCRIPTION="$(Echo 'queue install of local package lists into chroot')"
 HELP=""
-USAGE="${PROGRAM} [--force]"
+USAGE="${PROGRAM} {install|live} [--force]"
+
+_PASS="${1}"
+shift
 
 Arguments "${@}"
 
@@ -24,13 +27,13 @@ Arguments "${@}"
 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
 Set_defaults
 
-Echo_message "Begin queueing installation of local package lists..."
+Echo_message "Begin queueing installation of local package lists (${_PASS} pass)..."
 
 # Requiring stage file
 Require_stagefile .stage/config .stage/bootstrap
 
 # Checking stage file
-Check_stagefile .stage/chroot_local-packagelists
+Check_stagefile .stage/chroot_local-packagelists.${PASS}
 
 # Checking lock file
 Check_lockfile .lock
@@ -38,15 +41,19 @@ Check_lockfile .lock
 # Creating lock file
 Create_lockfile .lock
 
-if ls config/chroot_local-packagelists/*.list > /dev/null 2>&1
+if ls config/chroot_local-packagelists/*.list > /dev/null 2>&1 || \
+   ls config/chroot_local-packagelists/*.list.${_PASS} > /dev/null 2>&1
 then
-	for LIST in config/chroot_local-packagelists/*.list
+	for LIST in config/chroot_local-packagelists/*.list config/chroot_local-packagelists/*.list.${_PASS}
 	do
-		# Generating local package list
-		Expand_packagelist "$(basename ${LIST})" "config/chroot_local-packagelists" \
-			>> chroot/root/chroot_packages
+		if [ -e "${LIST}" ]
+		then
+			# Generating local package list
+			Expand_packagelist "$(basename ${LIST})" "config/chroot_local-packagelists" \
+				>> chroot/root/chroot_packages
+		fi
 	done
 
 	# Creating stage file
-	Create_stagefile .stage/chroot_local-packagelists
+	Create_stagefile .stage/chroot_local-packagelists.${_PASS}
 fi
diff --git a/scripts/build/lb_chroot_local-tasklists b/scripts/build/lb_chroot_local-tasklists
index 98bf353..2eef355 100755
--- a/scripts/build/lb_chroot_local-tasklists
+++ b/scripts/build/lb_chroot_local-tasklists
@@ -16,7 +16,10 @@ set -e
 # Setting static variables
 DESCRIPTION="$(Echo 'install local task lists into chroot')"
 HELP=""
-USAGE="${PROGRAM} [--force]"
+USAGE="${PROGRAM} {install|live} [--force]"
+
+_PASS="${1}"
+shift
 
 Arguments "${@}"
 
@@ -24,13 +27,13 @@ Arguments "${@}"
 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
 Set_defaults
 
-Echo_message "Begin installation of local task lists..."
+Echo_message "Begin installation of local task lists (${_PASS} pass)..."
 
 # Requiring stage file
 Require_stagefile .stage/config .stage/bootstrap
 
 # Checking stage file
-Check_stagefile .stage/chroot_local-tasklists
+Check_stagefile .stage/chroot_local-tasklists.${_PASS}
 
 # Checking lock file
 Check_lockfile .lock
@@ -38,13 +41,17 @@ Check_lockfile .lock
 # Creating lock file
 Create_lockfile .lock
 
-if ls config/chroot_local-tasklists/*.list > /dev/null 2>&1
+if ls config/chroot_local-tasklists/*.list > /dev/null 2>&1 || \
+   ls config/chroot_local-tasklists/*.list.${_PASS} > /dev/null 2>&1
 then
-	for LIST in config/chroot_local-tasklists/*.list
+	for LIST in config/chroot_local-tasklists/*.list config/chroot_local-tasklists/*.list.${_PASS}
 	do
-		# Generating local task list
-		Expand_packagelist "$(basename ${LIST})" "config/chroot_local-tasklists" \
-			>> chroot/root/chroot_tasks
+		if [ -e "${LIST}" ]
+		then
+			# Generating local task list
+			Expand_packagelist "$(basename ${LIST})" "config/chroot_local-tasklists" \
+				>> chroot/root/chroot_tasks
+		fi
 	done
 
 	# Restoring cache
@@ -137,5 +144,5 @@ then
 	Save_cache cache/packages_chroot
 
 	# Creating stage file
-	Create_stagefile .stage/chroot_local-tasklists
+	Create_stagefile .stage/chroot_local-tasklists.${_PASS}
 fi
diff --git a/scripts/build/lb_chroot_packagelists b/scripts/build/lb_chroot_packagelists
index d3b178b..4525465 100755
--- a/scripts/build/lb_chroot_packagelists
+++ b/scripts/build/lb_chroot_packagelists
@@ -16,7 +16,10 @@ set -e
 # Setting static variables
 DESCRIPTION="$(Echo 'queue install of package lists into chroot')"
 HELP=""
-USAGE="${PROGRAM} [--force]"
+USAGE="${PROGRAM} {install|live} [--force]"
+
+_PASS="${1}"
+shift
 
 Arguments "${@}"
 
@@ -24,13 +27,13 @@ Arguments "${@}"
 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
 Set_defaults
 
-Echo_message "Begin queueing installation of package lists..."
+Echo_message "Begin queueing installation of package lists (${_PASS} pass)..."
 
 # Requiring stage file
 Require_stagefile .stage/config .stage/bootstrap
 
 # Checking stage file
-Check_stagefile .stage/chroot_packagelists
+Check_stagefile .stage/chroot_packagelists.${_PASS}
 
 # Checking lock file
 Check_lockfile .lock
@@ -40,7 +43,6 @@ Create_lockfile .lock
 
 if [ -n "${LB_PACKAGE_LISTS}" ] && [ "${LB_PACKAGE_LISTS}" != "none" ]
 then
-
 	for LIST in ${LB_PACKAGE_LISTS}
 	do
 		# Generating package list
@@ -48,5 +50,5 @@ then
 	done
 
 	# Creating stage file
-	Create_stagefile .stage/chroot_packagelists
+	Create_stagefile .stage/chroot_packagelists.${_PASS}
 fi
diff --git a/scripts/build/lb_clean b/scripts/build/lb_clean
index d690a3a..bbf3e47 100755
--- a/scripts/build/lb_clean
+++ b/scripts/build/lb_clean
@@ -95,7 +95,7 @@ do
 			rm -f binary*.img
 			rm -f binary*.tar.gz
 			rm -f binary.sh
-			rm -f binary.list binary.packages md5sum.txt
+			rm -f binary.list binary.packages binary.packages.install binary.packages.live md5sum.txt
 
 			rm -rf binary
 			rm -rf tftpboot

-- 
live-build



More information about the debian-live-changes mailing list