From d7883ec32b2bb907fce17fb759c08c5cd9851fc3 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Mon, 4 May 2020 16:12:45 +0100 Subject: config: improve BIOS/EFI bootloader selection handling the design choice from when EFI support was introduced was to change `--bootloader` to `--bootloaders`, with users specifying their selection of BIOS and EFI bootloaders together. at this time there were not even any decent validation checks being performed, and invalid combinations could cause some chaos. since then proper validation was put in place, including checking that only a single instance of each of BIOS and EFI bootloaders exists in the selection. here we tweak things such that we stick with the same option, but we split the selection up such that we store the BIOS and EFI selections separately within the saved config file, and offer it up to scripts to help simplify those scripts. we must however retain support for splitting from the combined option, both because we still use it in the combined option, and for backwards compatibility with older saved configs. Gbp-Dch: Short --- scripts/build/source_debian | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/build/source_debian') diff --git a/scripts/build/source_debian b/scripts/build/source_debian index 2eed78861..ade03add9 100755 --- a/scripts/build/source_debian +++ b/scripts/build/source_debian @@ -54,9 +54,12 @@ Chroot chroot "sh source-selection.sh" rm -f chroot/source-selection.sh mv chroot/source-selection.txt ./ -for BOOTLOADER in ${LB_BOOTLOADERS}; do - echo "${BOOTLOADER}" >> source-selection.txt -done +if [ -n "${LB_BOOTLOADER_BIOS}" ]; then + echo "${LB_BOOTLOADER_BIOS}" >> source-selection.txt +fi +if [ -n "${LB_BOOTLOADER_EFI}" ]; then + echo "${LB_BOOTLOADER_EFI}" >> source-selection.txt +fi echo "live-build" >> source-selection.txt -- cgit v1.2.3