Fix evaluation bugs in mkarchiso
archiso/mkarchiso: Guard the call to `_mksignature()` in `_prepare_airootfs_image()` by an if statement. Using the `&&` logic leads to `_prepare_airootfs_image()` evaluating to false if `$gpg_key` is not set. Add `_msg_info()` calls to `_set_override()` which prevent the function from evaluating to false if no override is being done. Additionally this is great for debugging purposes. Add `_msg_info()` calls to `_read_profile()` (which is great for debugging purposes). Fixes #81
This commit is contained in:
parent
6c397136fd
commit
3160db0e9e
@ -643,7 +643,9 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {
|
|||||||
_prepare_airootfs_image() {
|
_prepare_airootfs_image() {
|
||||||
_run_once "_mkairootfs_${airootfs_image_type}"
|
_run_once "_mkairootfs_${airootfs_image_type}"
|
||||||
_mkchecksum
|
_mkchecksum
|
||||||
[[ -n "${gpg_key}" ]] && _mksignature
|
if [[ -n "${gpg_key}" ]]; then
|
||||||
|
_mksignature
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_validate_requirements_airootfs_image_type_squashfs() {
|
_validate_requirements_airootfs_image_type_squashfs() {
|
||||||
@ -779,6 +781,7 @@ _read_profile() {
|
|||||||
local validation_error=0
|
local validation_error=0
|
||||||
local bootmode
|
local bootmode
|
||||||
|
|
||||||
|
_msg_info "Reading profile..."
|
||||||
if [[ -z "${profile}" ]]; then
|
if [[ -z "${profile}" ]]; then
|
||||||
_msg_error "No profile specified!" 1
|
_msg_error "No profile specified!" 1
|
||||||
fi
|
fi
|
||||||
@ -844,16 +847,20 @@ _read_profile() {
|
|||||||
_msg_error "${validation_error} errors were encountered while validating the profile. Aborting." 1
|
_msg_error "${validation_error} errors were encountered while validating the profile. Aborting." 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
_msg_info "Done!"
|
||||||
}
|
}
|
||||||
|
|
||||||
# set overrides from mkarchiso option parameters, if present
|
# set overrides from mkarchiso option parameters, if present
|
||||||
_set_overrides() {
|
_set_overrides() {
|
||||||
|
_msg_info "Setting overrides..."
|
||||||
[[ -n "$override_iso_label" ]] && iso_label="$override_iso_label"
|
[[ -n "$override_iso_label" ]] && iso_label="$override_iso_label"
|
||||||
[[ -n "$override_iso_publisher" ]] && iso_publisher="$override_iso_publisher"
|
[[ -n "$override_iso_publisher" ]] && iso_publisher="$override_iso_publisher"
|
||||||
[[ -n "$override_iso_application" ]] && iso_application="$override_iso_application"
|
[[ -n "$override_iso_application" ]] && iso_application="$override_iso_application"
|
||||||
[[ -n "$override_install_dir" ]] && install_dir="$override_install_dir"
|
[[ -n "$override_install_dir" ]] && install_dir="$override_install_dir"
|
||||||
[[ -n "$override_pacman_conf" ]] && pacman_conf="$override_pacman_conf"
|
[[ -n "$override_pacman_conf" ]] && pacman_conf="$override_pacman_conf"
|
||||||
[[ -n "$override_gpg_key" ]] && gpg_key="$override_gpg_key"
|
[[ -n "$override_gpg_key" ]] && gpg_key="$override_gpg_key"
|
||||||
|
# NOTE: the call to _msg_info() conveniently guards this function from evaluating to false
|
||||||
|
_msg_info "Done!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user