[SCM] live-build branch, debian, updated. debian/3.0_a15-1-6-g201989e

Daniel Baumann daniel at debian.org
Sat Apr 23 17:30:39 UTC 2011


The following commit has been merged in the debian branch:
commit 890a6e5fb397e745ab3fb4bb5f8eda361716ed4e
Author: Daniel Baumann <daniel at debian.org>
Date:   Sat Apr 23 17:37:36 2011 +0200

    Removing kernel-img.conf handling for lenny and older.

diff --git a/scripts/build/lb_binary_rootfs b/scripts/build/lb_binary_rootfs
index 730535a..f6c35fd 100755
--- a/scripts/build/lb_binary_rootfs
+++ b/scripts/build/lb_binary_rootfs
@@ -123,7 +123,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
 					rm -f .lock
 					mv chroot/chroot chroot.tmp
 
-					lb chroot_linux-image remove ${*}
 					lb chroot_sources remove ${*}
 					lb chroot_apt remove ${*}
 					lb chroot_hostname remove ${*}
@@ -154,7 +153,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
 					lb chroot_hostname install ${*}
 					lb chroot_apt install ${*}
 					lb chroot_sources install ${*}
-					lb chroot_linux-image install ${*}
 
 					touch .lock
 				else
@@ -207,7 +205,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
 					rm -f .lock
 					mv chroot/chroot chroot.tmp
 
-					lb chroot_linux-image remove ${*}
 					lb chroot_sources remove ${*}
 					lb chroot_apt remove ${*}
 					lb chroot_hostname remove ${*}
@@ -238,7 +235,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
 					lb chroot_hostname install ${*}
 					lb chroot_apt install ${*}
 					lb chroot_sources install ${*}
-					lb chroot_linux-image install ${*}
 
 					touch .lock
 				else
@@ -339,7 +335,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
 					rm -f .lock
 					mv chroot/chroot chroot.tmp
 
-					lb chroot_linux-image remove ${*}
 					lb chroot_sources remove ${*}
 					lb chroot_apt remove ${*}
 					lb chroot_hostname remove ${*}
@@ -370,7 +365,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
 					lb chroot_hostname install ${*}
 					lb chroot_apt install ${*}
 					lb chroot_sources install ${*}
-					lb chroot_linux-image install ${*}
 
 					touch .lock
 				else
diff --git a/scripts/build/lb_chroot b/scripts/build/lb_chroot
index beff622..b24e625 100755
--- a/scripts/build/lb_chroot
+++ b/scripts/build/lb_chroot
@@ -50,9 +50,9 @@ lb chroot_resolv install ${*}
 lb chroot_hostname install ${*}
 lb chroot_apt install ${*}
 lb chroot_sources install ${*}
-lb chroot_linux-image install ${*}
 
 # Customizing chroot
+lb chroot_linux-image ${*}
 lb chroot_preseed ${*}
 lb chroot_local-preseed ${*}
 lb chroot_tasks ${*}
@@ -70,7 +70,6 @@ lb chroot_hacks ${*}
 lb chroot_interactive ${*}
 
 # Deconfiguring chroot
-lb chroot_linux-image remove ${*}
 lb chroot_sources remove ${*}
 lb chroot_apt remove ${*}
 lb chroot_hostname remove ${*}
diff --git a/scripts/build/lb_chroot_linux-image b/scripts/build/lb_chroot_linux-image
index ad8c6e6..39ee0fa 100755
--- a/scripts/build/lb_chroot_linux-image
+++ b/scripts/build/lb_chroot_linux-image
@@ -14,9 +14,9 @@ set -e
 . "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
 
 # Setting static variables
-DESCRIPTION="$(Echo 'manage /etc/kernel-img.conf')"
+DESCRIPTION="$(Echo 'schedule kernel packages for installation')"
 HELP=""
-USAGE="${PROGRAM} {install|remove} [--force]"
+USAGE="${PROGRAM} [--force]"
 
 Arguments "${@}"
 
@@ -27,104 +27,59 @@ Set_defaults
 # Requiring stage file
 Require_stagefile .stage/config .stage/bootstrap
 
-case "${1}" in
-	install)
-		Echo_message "Configuring file /etc/kernel-img.conf"
-
-		# Checking stage file
-		Check_stagefile .stage/chroot_linux-image
-
-		# Checking lock file
-		Check_lockfile .lock
-
-		# Creating lock file
-		Create_lockfile .lock
-
-		if [ -f chroot/etc/kernel-img.conf ]
-		then
-			# Saving kernel-img.conf
-			cp chroot/etc/kernel-img.conf chroot/etc/kernel-img.conf.old
-		fi
-
-		# Configuring kernel-img.conf
-cat >> chroot/etc/kernel-img.conf << EOF
-do_bootloader = No
-do_initrd = Yes
-warn_initrd = No
-EOF
-
-		# Diverting update-initramfs
-		#case "${LB_INITRAMFS}" in
-		#	live-boot)
-		#		mv chroot/usr/sbin/update-initramfs chroot/usr/sbin/update-initramfs.live-build
-		#		;;
-		#esac
-
-		if [ "${LB_LINUX_PACKAGES}" != "none" ]
-		then
-			for FLAVOUR in ${LB_LINUX_FLAVOURS}
-			do
-				for PACKAGE in ${LB_LINUX_PACKAGES}
-				do
-					echo ${PACKAGE}-${FLAVOUR} >> chroot/root/chroot_packages
-				done
-			done
-		fi
-
-		# Queue installation of linux-image and ${LB_INITRAMFS}
-		if [ "${LB_INITRAMFS}" != "none" ]
-		then
-			echo ${LB_INITRAMFS} >> chroot/root/chroot_packages
-		fi
-
-		# Queue installation of live-config
-		if [ "${LB_INITSYSTEM}" != "none" ]
-		then
-			echo "live-config live-config-${LB_INITSYSTEM}" >> chroot/root/chroot_packages
-		fi
-
-		# Do initsystem specific hacks
-		if [ "${LB_INITSYSTEM}" != "sysvinit" ]
-		then
-			# lets see if we still need the squeeze's "pre init system policy discussion" hack:
-
-			IS_SYSVINIT_ESSENTIAL="$(Chroot chroot dpkg-query --show --showformat='${Essential}\n' sysvinit)"
-			RC="$?"
-
-			if [ "${IS_SYSVINIT_ESSENTIAL}" != "no" ] && [ "${RC}" = "0" ]
-			then
-				# sysvinit is both installed and essential, ugly hack to remove it
-				Chroot chroot dpkg --force-remove-essential --remove sysvinit || true
-			fi
-		fi
-
-		# Creating stage file
-		Create_stagefile .stage/chroot_linux-image
-		;;
-
-	remove)
-		Echo_message "Deconfiguring file /etc/kernel-img.conf"
-
-		# Checking lock file
-		Check_lockfile .lock
-
-		# Creating lock file
-		Create_lockfile .lock
-
-		if [ -f chroot/etc/kernel-img.conf.old ]
-		then
-			# Restoring kernel-img.conf file
-			mv chroot/etc/kernel-img.conf.old chroot/etc/kernel-img.conf
-		else
-			# Removing kernel-img.conf file
-			Truncate chroot/etc/kernel-img.conf
-		fi
-
-		# Removing stage file
-		rm -f .stage/chroot_linux-image
-		;;
-
-	*)
-		Usage
-		;;
-esac
+# Checking stage file
+Check_stagefile .stage/chroot_linux-image
+
+# Checking lock file
+Check_lockfile .lock
+
+# Creating lock file
+Create_lockfile .lock
+
+# Diverting update-initramfs
+#case "${LB_INITRAMFS}" in
+#	live-boot)
+#		mv chroot/usr/sbin/update-initramfs chroot/usr/sbin/update-initramfs.live-build
+#		;;
+#esac
+
+if [ "${LB_LINUX_PACKAGES}" != "none" ]
+then
+	for FLAVOUR in ${LB_LINUX_FLAVOURS}
+	do
+		for PACKAGE in ${LB_LINUX_PACKAGES}
+		do
+			echo ${PACKAGE}-${FLAVOUR} >> chroot/root/chroot_packages
+		done
+	done
+fi
+
+# Queue installation of linux-image and ${LB_INITRAMFS}
+if [ "${LB_INITRAMFS}" != "none" ]
+then
+	echo ${LB_INITRAMFS} >> chroot/root/chroot_packages
+fi
+
+# Queue installation of live-config
+if [ "${LB_INITSYSTEM}" != "none" ]
+then
+	echo "live-config live-config-${LB_INITSYSTEM}" >> chroot/root/chroot_packages
+fi
+
+# Do initsystem specific hacks
+if [ "${LB_INITSYSTEM}" != "sysvinit" ]
+then
+	# lets see if we still need the squeeze's "pre init system policy discussion" hack:
+
+	IS_SYSVINIT_ESSENTIAL="$(Chroot chroot dpkg-query --show --showformat='${Essential}\n' sysvinit)"
+	RC="$?"
+
+	if [ "${IS_SYSVINIT_ESSENTIAL}" != "no" ] && [ "${RC}" = "0" ]
+	then
+		# sysvinit is both installed and essential, ugly hack to remove it
+		Chroot chroot dpkg --force-remove-essential --remove sysvinit || true
+	fi
+fi
+
+# Creating stage file
+Create_stagefile .stage/chroot_linux-image

-- 
live-build



More information about the debian-live-changes mailing list