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:
parent
78fc1c93e6
commit
61d0bec3ba
23
quickget
23
quickget
|
|
@ -4068,13 +4068,17 @@ if [ "${CHECK_ALL_ARCH}" == "true" ] && [ -n "${2}" ]; then
|
|||
fi
|
||||
|
||||
# Validate architecture support before attempting download
|
||||
if ! is_arch_supported "${OS}" "${ARCH}"; then
|
||||
if [ "${OPERATION}" == "test" ] || [ "${OPERATION}" == "show" ]; then
|
||||
test_result "${OS}" "${2:-}" "${3:-}" "" "SKIP" "(not available for ${ARCH})"
|
||||
exit 0
|
||||
else
|
||||
echo "ERROR! $(pretty_name "${OS}") is not available for ${ARCH} architecture."
|
||||
exit 1
|
||||
# Skip for OSes with editions_* functions - they have edition-dependent arch support
|
||||
# and will be validated after EDITION is parsed
|
||||
if [[ $(type -t "editions_${OS}") != function ]]; then
|
||||
if ! is_arch_supported "${OS}" "${ARCH}"; then
|
||||
if [ "${OPERATION}" == "test" ] || [ "${OPERATION}" == "show" ]; then
|
||||
test_result "${OS}" "${2:-}" "${3:-}" "" "SKIP" "(not available for ${ARCH})"
|
||||
exit 0
|
||||
else
|
||||
echo "ERROR! $(pretty_name "${OS}") is not available for ${ARCH} architecture."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -4102,6 +4106,11 @@ if [ -n "${2}" ]; then
|
|||
echo -e "\nERROR! You must specify an edition."
|
||||
exit 1
|
||||
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
|
||||
VM_PATH="${OS}-${RELEASE}-${EDITION}"
|
||||
create_vm "$("get_${OS}" "${EDITION}")"
|
||||
|
|
|
|||
Loading…
Reference in New Issue