config: s/LIVE_IMAGE_TYPE/LB_IMAGE_TYPE/
no backwards compatibility hack for reading the old var from existing saved config used because this was previously stored in the alternate format config/build file. Gbp-Dch: Short
This commit is contained in:
parent
83d9145257
commit
500f205073
|
@ -60,8 +60,10 @@ Prepare_config ()
|
|||
LB_DISTRIBUTION_BINARY="${LB_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_CHROOT}}"
|
||||
|
||||
LB_IMAGE_NAME="${LB_IMAGE_NAME:-live-image}"
|
||||
LIVE_IMAGE_NAME="${LB_IMAGE_NAME}" #for backwards compatibility with hooks
|
||||
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}"
|
||||
LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso-hybrid}"
|
||||
#for backwards compatibility with hooks
|
||||
LIVE_IMAGE_NAME="${LB_IMAGE_NAME}"
|
||||
LIVE_IMAGE_TYPE="${LB_IMAGE_TYPE}"
|
||||
|
||||
if [ -z "${LB_ARCHITECTURE}" ]; then
|
||||
if [ $(which dpkg) ]; then
|
||||
|
@ -283,11 +285,11 @@ Prepare_config ()
|
|||
|
||||
case "${LB_ARCHITECTURE}" in
|
||||
amd64|i386)
|
||||
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}"
|
||||
LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso-hybrid}"
|
||||
;;
|
||||
|
||||
*)
|
||||
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso}"
|
||||
LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso}"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -295,7 +297,7 @@ Prepare_config ()
|
|||
then
|
||||
case "${LB_ARCHITECTURE}" in
|
||||
amd64|i386)
|
||||
case "${LIVE_IMAGE_TYPE}" in
|
||||
case "${LB_IMAGE_TYPE}" in
|
||||
hdd|netboot)
|
||||
LB_BOOTLOADERS="syslinux"
|
||||
;;
|
||||
|
@ -363,7 +365,7 @@ Prepare_config ()
|
|||
local _LB_BOOTAPPEND_PRESEED
|
||||
if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
|
||||
then
|
||||
case "${LIVE_IMAGE_TYPE}" in
|
||||
case "${LB_IMAGE_TYPE}" in
|
||||
iso|iso-hybrid)
|
||||
_LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
|
||||
;;
|
||||
|
@ -567,7 +569,7 @@ Validate_config_permitted_values ()
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! In_list "${LIVE_IMAGE_TYPE}" iso iso-hybrid hdd tar netboot; then
|
||||
if ! In_list "${LB_IMAGE_TYPE}" iso iso-hybrid hdd tar netboot; then
|
||||
Echo_error "You have specified an invalid value for --binary-image."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -707,13 +709,13 @@ Validate_config_dependencies ()
|
|||
fi
|
||||
|
||||
if In_list "grub-pc" ${LB_BOOTLOADERS} || In_list "grub-efi" ${LB_BOOTLOADERS} || In_list "grub-legacy" ${LB_BOOTLOADERS}; then
|
||||
if In_list "${LIVE_IMAGE_TYPE}" hdd netboot; then
|
||||
if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
|
||||
Echo_error "You have selected an invalid combination of bootloaders and live image type; the grub-* bootloaders are not compatible with hdd and netboot types."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${LIVE_IMAGE_TYPE}" = "hdd" ] && [ "${LB_FIRST_BOOTLOADER}" = "grub-legacy" ]; then
|
||||
if [ "${LB_IMAGE_TYPE}" = "hdd" ] && [ "${LB_FIRST_BOOTLOADER}" = "grub-legacy" ]; then
|
||||
Echo_error "You have selected a combination of bootloader and image type that is currently not supported by live-build. Please use either another bootloader or a different image type."
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
|||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
if ! In_list "${LIVE_IMAGE_TYPE}" iso iso-hybrid hdd; then
|
||||
if ! In_list "${LB_IMAGE_TYPE}" iso iso-hybrid hdd; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
|||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
if In_list "${LIVE_IMAGE_TYPE}" hdd netboot; then
|
||||
if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
|||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
if In_list "${LIVE_IMAGE_TYPE}" hdd netboot; then
|
||||
if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -200,7 +200,7 @@ fi
|
|||
mkdir -p binary/boot/grub
|
||||
cp -r "${_SOURCE}"/* binary/boot/grub
|
||||
|
||||
case ${LIVE_IMAGE_TYPE} in
|
||||
case ${LB_IMAGE_TYPE} in
|
||||
iso|iso-hybrid)
|
||||
FILES="chroot/usr/lib/grub/*/stage2_eltorito"
|
||||
;;
|
||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
|||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
if In_list "${LIVE_IMAGE_TYPE}" hdd netboot; then
|
||||
if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -54,7 +54,7 @@ Install_package
|
|||
# Copying templates
|
||||
mkdir -p binary/boot/grub/i386-pc
|
||||
|
||||
case ${LIVE_IMAGE_TYPE} in
|
||||
case ${LB_IMAGE_TYPE} in
|
||||
iso|iso-hybrid)
|
||||
FILES="chroot/usr/lib/grub/i386-pc/*.mod chroot/usr/lib/grub/i386-pc/*.lst chroot/usr/lib/grub/i386-pc/efiemu??.o chroot/usr/share/grub/*.pf2"
|
||||
;;
|
||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
|||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
if [ "${LIVE_IMAGE_TYPE}" != "hdd" ]; then
|
||||
if [ "${LB_IMAGE_TYPE}" != "hdd" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ then
|
|||
cd "${OLDPWD}"
|
||||
|
||||
# Removing symlinks
|
||||
if [ "${LIVE_IMAGE_TYPE}" = "hdd" ]; then
|
||||
if [ "${LB_IMAGE_TYPE}" = "hdd" ]; then
|
||||
find binary -type l | xargs rm -f
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
|||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
case "${LIVE_IMAGE_TYPE}" in
|
||||
case "${LB_IMAGE_TYPE}" in
|
||||
iso)
|
||||
IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
|
||||
;;
|
||||
|
@ -66,7 +66,7 @@ fi
|
|||
XORRISO_OPTIONS="-R -r -J -joliet-long -l -cache-inodes -iso-level 3"
|
||||
|
||||
# Handle xorriso live-build specific options
|
||||
if [ "${LIVE_IMAGE_TYPE}" = "iso-hybrid" ]
|
||||
if [ "${LB_IMAGE_TYPE}" = "iso-hybrid" ]
|
||||
then
|
||||
XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16"
|
||||
fi
|
||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
|||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
if [ "${LIVE_IMAGE_TYPE}" != "netboot" ]; then
|
||||
if [ "${LB_IMAGE_TYPE}" != "netboot" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
case "${LIVE_IMAGE_TYPE}" in
|
||||
case "${LB_IMAGE_TYPE}" in
|
||||
iso)
|
||||
IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
|
||||
;;
|
||||
|
|
|
@ -48,7 +48,7 @@ case "${LB_INITRAMFS}" in
|
|||
esac
|
||||
|
||||
# Assembling image specifics
|
||||
case "${LIVE_IMAGE_TYPE}" in
|
||||
case "${LB_IMAGE_TYPE}" in
|
||||
iso|iso-hybrid)
|
||||
_BOOTLOADER="isolinux"
|
||||
_TARGET="binary/isolinux"
|
||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
|||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
if [ "${LIVE_IMAGE_TYPE}" != "tar" ]; then
|
||||
if [ "${LB_IMAGE_TYPE}" != "tar" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
|||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
if [ "${LIVE_IMAGE_TYPE}" != "iso" ] && [ "${LIVE_IMAGE_TYPE}" != "iso-hybrid" ]
|
||||
if [ "${LB_IMAGE_TYPE}" != "iso" ] && [ "${LB_IMAGE_TYPE}" != "iso-hybrid" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
@ -51,7 +51,7 @@ Restore_package_cache binary
|
|||
# Installing depends
|
||||
Install_package
|
||||
|
||||
case "${LIVE_IMAGE_TYPE}" in
|
||||
case "${LB_IMAGE_TYPE}" in
|
||||
iso)
|
||||
_IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
|
||||
;;
|
||||
|
|
|
@ -32,7 +32,7 @@ Check_stagefile
|
|||
# Acquire lock file
|
||||
Acquire_lockfile
|
||||
|
||||
case "${LIVE_IMAGE_TYPE}" in
|
||||
case "${LB_IMAGE_TYPE}" in
|
||||
netboot)
|
||||
if [ ! -f chroot/sbin/mount.cifs ]
|
||||
then
|
||||
|
|
|
@ -378,7 +378,7 @@ Local_arguments ()
|
|||
;;
|
||||
|
||||
-b|--binary-image|--binary-images)
|
||||
LIVE_IMAGE_TYPE="${2}"
|
||||
LB_IMAGE_TYPE="${2}"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
|
@ -1205,8 +1205,8 @@ mkdir -p config/bootloaders
|
|||
cat > config/binary << EOF
|
||||
# config/binary - options for live-build(7), binary stage
|
||||
|
||||
# \$LIVE_IMAGE_TYPE: set image type
|
||||
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE}"
|
||||
# \$LB_IMAGE_TYPE: set image type
|
||||
LB_IMAGE_TYPE="${LB_IMAGE_TYPE}"
|
||||
|
||||
# \$LB_BINARY_FILESYSTEM: set image filesystem
|
||||
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM}"
|
||||
|
|
|
@ -60,7 +60,7 @@ else
|
|||
fi
|
||||
|
||||
# Setting destination directory
|
||||
case "${LIVE_IMAGE_TYPE}" in
|
||||
case "${LB_IMAGE_TYPE}" in
|
||||
netboot)
|
||||
DESTDIR="tftpboot/debian-install/${LB_ARCHITECTURE}"
|
||||
;;
|
||||
|
@ -76,7 +76,7 @@ case "${LB_DEBIAN_INSTALLER}" in
|
|||
DI_IMAGE_TYPE="netboot"
|
||||
;;
|
||||
*)
|
||||
case "${LIVE_IMAGE_TYPE}" in
|
||||
case "${LB_IMAGE_TYPE}" in
|
||||
netboot)
|
||||
DI_IMAGE_TYPE="netboot"
|
||||
;;
|
||||
|
@ -734,7 +734,7 @@ EOF
|
|||
DISTRIBUTIONS="${DISTRIBUTIONS} ${LB_PARENT_DISTRIBUTION_BINARY}"
|
||||
fi
|
||||
|
||||
case "${LIVE_IMAGE_TYPE}" in
|
||||
case "${LB_IMAGE_TYPE}" in
|
||||
hdd)
|
||||
case "${LB_BINARY_FILESYSTEM}" in
|
||||
fat*|ntfs)
|
||||
|
|
Loading…
Reference in New Issue