fix(quickget): validate architecture support after edition selection

- Skip early architecture check for OSes with editions_<os> to avoid
  rejecting valid edition-specific combinations
- Perform architecture validation after EDITION is known and show a
  descriptive error when the chosen edition isn't available on ARCH
- Preserve test/show behaviour (report SKIP) and keep previous flow for
  OSes without editions_<os>

Signed-off-by: Martin Wimpress <martin@wimpress.org>
This commit is contained in:
Martin Wimpress 2026-01-25 00:18:12 +00:00 committed by Martin Wimpress
parent 78fc1c93e6
commit 61d0bec3ba
1 changed files with 16 additions and 7 deletions

View File

@ -4068,13 +4068,17 @@ if [ "${CHECK_ALL_ARCH}" == "true" ] && [ -n "${2}" ]; then
fi fi
# Validate architecture support before attempting download # Validate architecture support before attempting download
if ! is_arch_supported "${OS}" "${ARCH}"; then # Skip for OSes with editions_* functions - they have edition-dependent arch support
if [ "${OPERATION}" == "test" ] || [ "${OPERATION}" == "show" ]; then # and will be validated after EDITION is parsed
test_result "${OS}" "${2:-}" "${3:-}" "" "SKIP" "(not available for ${ARCH})" if [[ $(type -t "editions_${OS}") != function ]]; then
exit 0 if ! is_arch_supported "${OS}" "${ARCH}"; then
else if [ "${OPERATION}" == "test" ] || [ "${OPERATION}" == "show" ]; then
echo "ERROR! $(pretty_name "${OS}") is not available for ${ARCH} architecture." test_result "${OS}" "${2:-}" "${3:-}" "" "SKIP" "(not available for ${ARCH})"
exit 1 exit 0
else
echo "ERROR! $(pretty_name "${OS}") is not available for ${ARCH} architecture."
exit 1
fi
fi fi
fi fi
@ -4102,6 +4106,11 @@ if [ -n "${2}" ]; then
echo -e "\nERROR! You must specify an edition." echo -e "\nERROR! You must specify an edition."
exit 1 exit 1
fi fi
# Now that EDITION is known, validate architecture support
if ! is_arch_supported "${OS}" "${ARCH}"; then
echo "ERROR! $(pretty_name "${OS}") ${EDITION} is not available for ${ARCH} architecture."
exit 1
fi
handle_missing handle_missing
VM_PATH="${OS}-${RELEASE}-${EDITION}" VM_PATH="${OS}-${RELEASE}-${EDITION}"
create_vm "$("get_${OS}" "${EDITION}")" create_vm "$("get_${OS}" "${EDITION}")"