diff --git a/misc/tools.func b/misc/tools.func index 2e24af7f9..d12cef3be 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -962,9 +962,13 @@ get_fallback_suite() { local distro_codename="$2" local repo_base_url="$3" - # Comprehensive fallback mappings (applied first for known distros to avoid - # repos that exist via HTTP but ship packages with broken dependencies on - # newer releases, e.g. Adoptium trixie → p11-kit missing on Debian 13) + # Check if current codename works + if verify_repo_available "$repo_base_url" "$distro_codename"; then + echo "$distro_codename" + return 0 + fi + + # Comprehensive fallback mappings case "$distro_id" in debian) case "$distro_codename" in