fix(quickget): skip unsupported architectures for all operations

- Remove the OPERATION == "test" guard so is_arch_supported() is
evaluated
  unconditionally
- Apply the unconditional arch check in test_all() for editions loop,
  ubuntu-server, ubuntu desktop (ubuntu*), and the default case
- Skip generating URLs / running further logic when an OS is not
available
  for the requested ARCH
IMPACT: quickget will no longer attempt to generate or test downloads
for
architectures that the distro does not support, preventing incorrect URL
generation and false-positive test attempts.

Signed-off-by: Martin Wimpress <martin@wimpress.org>
This commit is contained in:
Martin Wimpress 2026-01-24 23:28:33 +00:00 committed by Martin Wimpress
parent 5bbfdd1b54
commit 78fc1c93e6
1 changed files with 8 additions and 5 deletions

View File

@ -573,7 +573,7 @@ function test_all() {
if [[ $(type -t "editions_${OS}") == function ]]; then
for EDITION in $(editions_"${OS}"); do
# Check architecture support before generating URL
if [ "${OPERATION}" == "test" ] && ! is_arch_supported "${OS}" "${ARCH}"; then
if ! is_arch_supported "${OS}" "${ARCH}"; then
test_result "${OS}" "${RELEASE}" "${EDITION}" "" "SKIP" "(not available for ${ARCH})"
continue
fi
@ -601,7 +601,7 @@ function test_all() {
(get_macos)
elif [ "${OS}" == "ubuntu-server" ]; then
# Check architecture support before generating URL
if [ "${OPERATION}" == "test" ] && ! is_arch_supported "${OS}" "${ARCH}"; then
if ! is_arch_supported "${OS}" "${ARCH}"; then
test_result "${OS}" "${RELEASE}" "" "" "SKIP" "(not available for ${ARCH})"
continue
fi
@ -609,7 +609,7 @@ function test_all() {
(get_ubuntu-server)
elif [[ "${OS}" == *ubuntu* ]]; then
# Ubuntu desktop is amd64 only (no arch function = amd64 default)
if [ "${OPERATION}" == "test" ] && ! is_arch_supported "${OS}" "${ARCH}"; then
if ! is_arch_supported "${OS}" "${ARCH}"; then
test_result "${OS}" "${RELEASE}" "" "" "SKIP" "(not available for ${ARCH})"
continue
fi
@ -617,7 +617,7 @@ function test_all() {
(get_ubuntu)
else
# Check architecture support before generating URL
if [ "${OPERATION}" == "test" ] && ! is_arch_supported "${OS}" "${ARCH}"; then
if ! is_arch_supported "${OS}" "${ARCH}"; then
test_result "${OS}" "${RELEASE}" "" "" "SKIP" "(not available for ${ARCH})"
continue
fi
@ -1388,7 +1388,10 @@ function arch_debian() {
}
function arch_fedora() {
echo "amd64 arm64"
case "${EDITION}" in
Server) echo "amd64 arm64";;
*) echo "amd64";;
esac
}
function arch_ubuntu-server() {