simplify --debian-installer choices

`false` and `none` make no sense as choices for this option. Here we
replace `false` with `none`, and remove `true`.

Note that `true` was treated as an alias for netinst (see the changes to
source_disk and and binary_disk).

For backwards compatibility we still allow `true` and `false` by converting
them to `netinst` and `none` respectively, whilst printing a warning to
encourage users to move to `netinst`/`none`.

Gbp-Dch: Short
Closes: #952864
This commit is contained in:
jnqnfe 2015-01-05 16:53:53 +00:00 committed by Raphaël Hertzog
parent 6002f89b67
commit fcafaede19
10 changed files with 27 additions and 17 deletions

View File

@ -576,7 +576,17 @@ Set_defaults ()
LB_BUILD_WITH_TMPFS="${LB_BUILD_WITH_TMPFS:-false}"
# Setting debian-installer option
LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER:-false}"
LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER:-none}"
if [ "${LB_DEBIAN_INSTALLER}" = "false" ]
then
LB_DEBIAN_INSTALLER="none"
Echo_warning "A value of 'false' for option LB_DEBIAN_INSTALLER is deprecated, please use 'none' in future."
fi
if [ "${LB_DEBIAN_INSTALLER}" = "true" ]
then
LB_DEBIAN_INSTALLER="netinst"
Echo_warning "A value of 'true' for option LB_DEBIAN_INSTALLER is deprecated, please use 'netinst' in future."
fi
LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_DISTRIBUTION}}"
@ -715,7 +725,7 @@ Set_defaults ()
*)
case "${LB_ARCHITECTURES}" in
amd64|i386)
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
then
LB_LOADLIN="${LB_LOADLIN:-true}"
else
@ -739,7 +749,7 @@ Set_defaults ()
*)
case "${LB_ARCHITECTURES}" in
amd64|i386)
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
then
LB_WIN32_LOADER="${LB_WIN32_LOADER:-true}"
else
@ -823,7 +833,7 @@ Check_defaults ()
exit 1
fi
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
then
# d-i true, no caching
if ! echo ${LB_CACHE_STAGES} | grep -qs "bootstrap\b" || [ "${LB_CACHE}" != "true" ] || [ "${LB_CACHE_PACKAGES}" != "true" ]

View File

@ -82,7 +82,7 @@
.br
[\fB\-\-debconf\-priority\fR low|medium|high|critical]
.br
[\fB\-\-debian\-installer\fR true|cdrom|netinst|netboot|businesscard|live|false]
[\fB\-\-debian\-installer\fR cdrom|netinst|netboot|businesscard|live|none]
.br
[\fB\-\-debian\-installer\-distribution\fR daily|\fICODENAME\fR]
.br
@ -327,7 +327,7 @@ bootstraps the config tree from a git repository, optionally appended by a Git I
defines what value the debconf frontend should be set to inside the chroot. Note that setting it to anything but noninteractive, which is the default, makes your build asking questions during the build.
.IP "\fB\-\-debconf\-priority\fR low|medium|high|critical" 4
defines what value the debconf priority should be set to inside the chroot. By default, it is set to critical, which means that almost no questions are displayed. Note that this only has an effect if you use any debconf frontend different from noninteractive.
.IP "\fB\-\-debian\-installer\fR true|cdrom|netinst|netboot|businesscard|live|false" 4
.IP "\fB\-\-debian\-installer\fR cdrom|netinst|netboot|businesscard|live|none" 4
defines which type, if any, of the debian\-installer should be included in the resulting binary image. By default, no installer is included. All available flavours except live are the identical configurations used on the installer media produced by regular debian\-cd. When live is chosen, the live\-installer udeb is included so that debian\-installer will behave different than usual \- instead of installing the debian system from packages from the medium or the network, it installs the live system to the disk.
.IP "\fB\-\-debian\-installer\-distribution\fR daily|\fICODENAME\fR" 4
defines the distribution where the debian\-installer files should be taken out from. Normally, this should be set to the same distribution as the live system. However, sometimes, one wants to use a newer or even daily built installer.

View File

@ -118,7 +118,7 @@ case "${LB_DEBIAN_INSTALLER}" in
done
;;
true|netinst|live)
netinst|live)
echo "main" > binary/.disk/base_components
touch binary/.disk/base_installable
@ -171,7 +171,7 @@ case "${LB_DEBIAN_INSTALLER}" in
done
;;
false)
none)
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
;;
esac

View File

@ -202,7 +202,7 @@ done
LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's|binary||g' -e 's|//|/|g')"
# Assembling debian-installer configuration
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
then
LINUX_LIVE="title\t\tLive:\nroot\n\n${LINUX_LIVE}"
LINUX_INSTALL="title\t\tInstaller:\nroot"

View File

@ -237,7 +237,7 @@ if [ $_COUNT -gt 1 ]; then
fi
# Assembling debian-installer configuration
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
then
KERNEL_DI="/install/vmlinuz"
INITRD_DI="/install/initrd.gz"

View File

@ -88,7 +88,7 @@ PictureFiles=false
VideoFiles=false
EOF
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
then
cat > binary/win32-loader.ini << EOF

View File

@ -53,7 +53,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--config GIT_URL::GIT_BRANCH]\n\
\t [--debconf-frontend dialog|editor|noninteractive|readline]\n\
\t [--debconf-priority low|medium|high|critical]\n\
\t [--debian-installer true|cdrom|netinst|netboot|businesscard|live|false]\n\
\t [--debian-installer cdrom|netinst|netboot|businesscard|live|none]\n\
\t [--debian-installer-distribution daily|CODENAME]\n\
\t [--debian-installer-gui true|false]\n\
\t [--debian-installer-preseedfile FILE|URL]\n\

View File

@ -36,10 +36,10 @@ fi
# Check d-i configuration
case "${LB_DEBIAN_INSTALLER}" in
true|cdrom|netinst|netboot|businesscard|live)
cdrom|netinst|netboot|businesscard|live)
;;
false)
none)
exit 0
;;

View File

@ -27,7 +27,7 @@ Set_defaults
# Check d-i configuration
case "${LB_DEBIAN_INSTALLER}" in
false)
none)
exit 0
;;
esac

View File

@ -102,7 +102,7 @@ case "${LB_DEBIAN_INSTALLER}" in
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/CD Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
;;
true|netinst)
netinst)
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/NETINST Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
;;
@ -118,7 +118,7 @@ case "${LB_DEBIAN_INSTALLER}" in
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/BC Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
;;
false)
none)
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
;;
esac