Verified Commit 3160db0e authored by David Runge's avatar David Runge
Browse files

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
parent 6c397136
Pipeline #3229 passed with stage
in 14 seconds
......@@ -643,7 +643,9 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {
_prepare_airootfs_image() {
_run_once "_mkairootfs_${airootfs_image_type}"
_mkchecksum
[[ -n "${gpg_key}" ]] && _mksignature
if [[ -n "${gpg_key}" ]]; then
_mksignature
fi
}
_validate_requirements_airootfs_image_type_squashfs() {
......@@ -779,6 +781,7 @@ _read_profile() {
local validation_error=0
local bootmode
_msg_info "Reading profile..."
if [[ -z "${profile}" ]]; then
_msg_error "No profile specified!" 1
fi
......@@ -844,16 +847,20 @@ _read_profile() {
_msg_error "${validation_error} errors were encountered while validating the profile. Aborting." 1
fi
fi
_msg_info "Done!"
}
# set overrides from mkarchiso option parameters, if present
_set_overrides() {
_msg_info "Setting overrides..."
[[ -n "$override_iso_label" ]] && iso_label="$override_iso_label"
[[ -n "$override_iso_publisher" ]] && iso_publisher="$override_iso_publisher"
[[ -n "$override_iso_application" ]] && iso_application="$override_iso_application"
[[ -n "$override_install_dir" ]] && install_dir="$override_install_dir"
[[ -n "$override_pacman_conf" ]] && pacman_conf="$override_pacman_conf"
[[ -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!"
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment