Sorry, I noticed a small mistake in the documentation which I had failed
to spot before submitting. Updated patch attached!
commit 207a4ce153fdfb03ad49576f835b45f5f0ca5507
Author: jnqnfe <[email protected]>
Date:   Sun Dec 21 17:19:20 2014 +0000

    Properly obey bootstrap selection, update preferential default to 
cdebootstrap, and clear out remaining reference to old copy option.

diff --git a/functions/defaults.sh b/functions/defaults.sh
index c74d1c1..d341417 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -221,14 +221,20 @@ Set_defaults ()
        esac
 
        # Setting bootstrap program
-       if [ -z "${LB_BOOTSTRAP}" ] || ( [ ! -x "$(which ${LB_BOOTSTRAP} 
2>/dev/null)" ] && [ "${LB_BOOTSTRAP}" != "copy" ] )
+       if [ -z "${LB_BOOTSTRAP}" ]
        then
-               if [ -x "/usr/sbin/debootstrap" ]
-               then
-                       LB_BOOTSTRAP="debootstrap"
-               elif [ -x "/usr/bin/cdebootstrap" ]
+               if [ -x "/usr/bin/cdebootstrap" ]
                then
                        LB_BOOTSTRAP="cdebootstrap"
+               elif [ -x "/usr/bin/cdebootstrap-static" ]
+               then
+                       LB_BOOTSTRAP="cdebootstrap-static"
+               elif [ -x "/usr/sbin/debootstrap" ]
+               then
+                       LB_BOOTSTRAP="debootstrap"
+               else
+                       Echo_error "No bootstrap program specified or otherwise 
found, please install one and try again!"
+                       exit 1
                fi
        fi
 
@@ -1053,6 +1059,20 @@ Check_defaults ()
                fi
        fi
 
+       case "${LB_BOOTSTRAP}" in
+               cdebootstrap|cdebootstrap-static|debootstrap)
+                       ;;
+               *)
+                       Echo_error "Bootstrap program selection '%s' is invalid 
or unsupported!" "${LB_BOOTSTRAP}"
+                       exit 1
+                       ;;
+       esac
+       if [ ! -x "$(which ${LB_BOOTSTRAP} 2>/dev/null)" ]
+       then
+               Echo_error "Command %s not found. Please check that the 
relevant bootstrap program is installed and try again!" "${LB_BOOTSTRAP}"
+               exit 1
+       fi
+
        case "${LB_BINARY_FILESYSTEM}" in
                ntfs)
                        if [ ! -x "$(which ntfs-3g 2>/dev/null)" ]
diff --git a/manpages/en/lb_config.1 b/manpages/en/lb_config.1
index b612f87..d9e045f 100644
--- a/manpages/en/lb_config.1
+++ b/manpages/en/lb_config.1
@@ -268,7 +268,7 @@ sets boot parameters specific to debian\-live. A complete 
list of boot parameter
 .IP "\fB\-\-bootloader\fR grub|grub2|syslinux" 4
 defines which bootloader is being used in the generated image. This has only 
an effect if the selected binary image type does allow to choose the 
bootloader. For example, if you build a iso, always syslinux (or more precise, 
isolinux) is being used. Also note that some combinations of binary images 
types and bootloaders may be possible but live\-build does not support them 
yet. \fBlb config\fR will fail to create such a not yet supported configuration 
and give a explanation about it. For hdd images on amd64 and i386, the default 
is syslinux.
 .IP "\fB\-\-bootstrap\fR cdebootstrap|cdebootstrap-static|debootstrap" 4
-defines which program is used to bootstrap the debian chroot, default is 
debootstrap.
+defines which program is used to build a base debian filesystem, which 
provides the foundations for the live OS filesystem, and also a chroot 
environment for the build process. If a selection is not explicitly made via 
this parameter, an attempt will be made to find and default to one already 
installed on your system, in the order of preference: cdebootstrap, then 
cdebootstrap-static, then finally debootstrap.
 .IP "\fB\-\-cache\fR true|false" 4
 defines globally if any cache should be used at all. Different caches can be 
controlled through the their own options.
 .IP "\fB\-\-cache\-indices\fR true|false" 4
diff --git a/scripts/build/bootstrap_cdebootstrap 
b/scripts/build/bootstrap_cdebootstrap
index 490352b..55bbdf3 100755
--- a/scripts/build/bootstrap_cdebootstrap
+++ b/scripts/build/bootstrap_cdebootstrap
@@ -31,9 +31,7 @@ fi
 
 if [ ! -x "$(which cdebootstrap 2>/dev/null)" ]
 then
-       echo "E: cdebootstrap - command not found"
-       echo "I: cdebootstrap can be obtained from 
http://ftp.debian.org/debian/pool/main/d/cdebootstrap/";
-       echo "I: On Debian based systems, cdebootstrap can be installed with 
'apt-get install cdebootstrap'."
+       Echo_error "Command %s not found. Please check that your selected 
bootstrap program is installed and try again!" "${LB_BOOTSTRAP}"
        exit 1
 fi
 
diff --git a/scripts/build/bootstrap_debootstrap 
b/scripts/build/bootstrap_debootstrap
index 76fe32e..3cbe29b 100755
--- a/scripts/build/bootstrap_debootstrap
+++ b/scripts/build/bootstrap_debootstrap
@@ -31,9 +31,7 @@ fi
 
 if [ ! -x "$(which debootstrap 2>/dev/null)" ]
 then
-       echo "E: debootstrap - command not found"
-       echo "I: debootstrap can be obtained from 
http://ftp.debian.org/debian/pool/main/d/debootstrap/";
-       echo "I: On Debian based systems, debootstrap can be installed with 
'apt-get install debootstrap'."
+       Echo_error "Command %s not found. Please check that your selected 
bootstrap program is installed and try again!" "${LB_BOOTSTRAP}"
        exit 1
 fi
 

Reply via email to