Hi List,
Please find attached a small patch which add new options to debootstrap
script and manpage:
--list-suite list available debootstrap suites
--check-suite=A check if suite A is supported by debootstrap
These options may be useful to developers willing to have a build system
where they can customize the debootstrap SUITE parameter and perform
sanity check before executing the script (e.g. ./configure
--with-suite=sarge).
The patch also adds --version to the man page.
Cheers,
Julien.
--
Julien Kerihuel
j.kerihuel@openchange.org
OpenChange Project Manager
GPG Fingerprint: 0B55 783D A781 6329 108A B609 7EF6 FE11 A35F 1F79
Index: debootstrap
===================================================================
--- debootstrap (revision 51904)
+++ debootstrap (working copy)
@@ -70,6 +70,9 @@
--version display version information and exit
--verbose don't turn off the output of wget
+ --list-suite list available debootstrap suites
+ --check-suite=A check if suite A is supported by debootstrap
+
--download-only download packages, but don't perform installation
--print-debs print the packages to be installed, and exit
@@ -115,6 +118,30 @@
echo "debootstrap $VERSION"
exit 0
;;
+ --list-suite)
+ echo -n "available debootstrap suites: "
+ file=($DEBOOTSTRAP_DIR/scripts/*)
+ for suite in ${file[@]}
+ do
+ echo -n "$suite " | sed -e 's/.*\///g'
+ done
+ echo ""
+ exit 0
+ ;;
+ --check-suite*)
+ search="$(echo $1 | cut -f2 -d"=")"
+ file=($DEBOOTSTRAP_DIR/scripts/*)
+ for suite in ${file[@]}
+ do
+ suite=`echo $suite | sed -e 's/.*\///g'`
+ if [ "$suite" = "$search" ]; then
+ echo "$search suite is supported"
+ exit 0
+ fi
+ done
+ echo "$search suite is not supported"
+ exit 0
+ ;;
--boot-floppies)
if [ -n "$USE_DEBIANINSTALLER_INTERACTION" ] ; then
error 1 ARG_BFDI "Can only use one of --boot-floppies and --debian-installer"
Index: debootstrap.8
===================================================================
--- debootstrap.8 (revision 51904)
+++ debootstrap.8 (working copy)
@@ -84,6 +84,14 @@
.IP "\fB\-\-verbose\fP"
Produce more info about downloading.
.IP
+.IP "\fB\-\-version\fP"
+Display debootstrap version.
+.IP
+.IP "\fB\-\-list-suite\fP"
+List available debootstrap suites.
+.IP
+.IP "\fB\-\-check-suite=SUITE"
+Check if the suite specified is supported by debootstrap.
.IP "\fB\-\-print\-debs\fP"
Print the packages to be installed, and exit.
Note that a TARGET directory must be specified so debootstrap can
Attachment:
signature.asc
Description: This is a digitally signed message part