From 451d36016c116b552604cfe1d05f181894cdba69 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel@debian.org>
Date: Fri, 23 Jan 2009 00:00:48 +0100
Subject: Adding support for using cdebootstra-static as bootstrap program.

---
 debian/control                    |  2 +-
 helpers/lh_bootstrap_cdebootstrap | 16 ++++++++--------
 helpers/lh_config                 |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/debian/control b/debian/control
index 3c4b8f0..fdce4e7 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Vcs-Git: git://git.debian.net/git/debian-live/live-helper.git
 
 Package: live-helper
 Architecture: all
-Depends: debootstrap | cdebootstrap
+Depends: debootstrap | cdebootstrap | cdebootstrap-static
 Recommends: gettext-base
 Suggests: dosfstools, genisoimage, memtest86+ | memtest86, mtools, parted, squashfs-tools | genext2fs | mtd-tools, sudo | fakeroot, syslinux | grub, uuid-runtime, win32-loader
 Description: Debian Live build scripts
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap
index 36cc855..6ab5c52 100755
--- a/helpers/lh_bootstrap_cdebootstrap
+++ b/helpers/lh_bootstrap_cdebootstrap
@@ -28,7 +28,7 @@ Arguments "${@}"
 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
 Set_defaults
 
-if [ "${LH_BOOTSTRAP}" != "cdebootstrap" ]
+if [ "${LH_BOOTSTRAP}" != "cdebootstrap" ] && [ "${LH_BOOTSTRAP}" != "cdebootstrap-static" ]
 then
 	exit 0
 fi
@@ -38,7 +38,7 @@ Check_crossarchitecture
 
 Echo_message "Begin bootstrapping system..."
 
-Check_package /usr/bin/cdebootstrap cdebootstrap
+Check_package /usr/bin/${LH_BOOTSTRAP} cdebootstrap
 
 # Ensure that a system is built as root
 lh_testroot
@@ -124,7 +124,7 @@ then
 	CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --allow-unauthenticated"
 fi
 
-if [ -x "/usr/bin/cdebootstrap" ]
+if [ -x "/usr/bin/cdebootstrap" ] || [ -x "/usr/bin/cdebootstrap-static" ]
 then
 	if [ "${LH_CACHE_PACKAGES}" = "enabled" ]
 	then
@@ -134,8 +134,8 @@ then
 			cp cache/packages_bootstrap/*.deb chroot/var/cache/bootstrap
 		fi
 
-		Echo_breakage "Running cdebootstrap (download-only)... "
-		${LH_ROOT_COMMAND} cdebootstrap ${CDEBOOTSTRAP_OPTIONS} --download-only "${LH_DISTRIBUTION}" chroot "${LH_MIRROR_BOOTSTRAP}"
+		Echo_breakage "Running ${LH_BOOTSTRAP} (download-only)... "
+		${LH_ROOT_COMMAND} ${LH_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} --download-only "${LH_DISTRIBUTION}" chroot "${LH_MIRROR_BOOTSTRAP}"
 
 		if [ -n "${LH_ROOT_COMMAND}" ]
 		then
@@ -154,8 +154,8 @@ then
 		cp chroot/var/cache/bootstrap/*.deb cache/packages_bootstrap
 	fi
 
-	Echo_breakage "Running cdebootstrap... "
-	${LH_ROOT_COMMAND} cdebootstrap ${CDEBOOTSTRAP_OPTIONS} "${LH_DISTRIBUTION}" chroot "${LH_MIRROR_BOOTSTRAP}"
+	Echo_breakage "Running ${LH_BOOTSTRAP}... "
+	${LH_ROOT_COMMAND} ${LH_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} "${LH_DISTRIBUTION}" chroot "${LH_MIRROR_BOOTSTRAP}"
 
 	if [ -n "${LH_ROOT_COMMAND}" ]
 	then
@@ -180,6 +180,6 @@ then
 	# Creating stage file
 	Create_stagefile .stage/bootstrap
 else
-	Echo_error "Can't process file /usr/bin/cdebootstrap (FIXME)"
+	Echo_error "Can't process file /usr/bin/${LH_BOOTSTRAP} (FIXME)"
 	exit 1
 fi
diff --git a/helpers/lh_config b/helpers/lh_config
index c2137ad..1bbb2d4 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -36,7 +36,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
 \t    [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\
 \t    [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\
 \t    [--bootloader grub|syslinux|yaboot]\n\
-\t    [--bootstrap cdebootstrap|debootstrap|copy]\n\
+\t    [--bootstrap cdebootstrap|cdebootstrap-static|debootstrap|copy]\n\
 \t    [--bootstrap-config FILE]\n\
 \t    [-f|--bootstrap-flavour minimal|standard]\n\
 \t    [--bootstrap-keyring PACKAGE]\n\
-- 
cgit v1.0