mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-07 03:42:50 +00:00
Add explicit suite mapping for Debian and Ubuntu
Introduces explicit mapping of distro codenames to repository suites for Debian and Ubuntu, with fallbacks for newer or unknown releases. This ensures proper repository setup even when upstream does not yet support the latest distributions.
This commit is contained in:
@@ -450,7 +450,51 @@ manage_tool_repository() {
|
|||||||
# Setup repository
|
# Setup repository
|
||||||
local distro_codename
|
local distro_codename
|
||||||
distro_codename=$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)
|
distro_codename=$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)
|
||||||
|
|
||||||
|
# Suite mapping with fallback for newer releases not yet supported by upstream
|
||||||
|
if [[ "$distro_id" == "debian" ]]; then
|
||||||
|
case "$distro_codename" in
|
||||||
|
trixie | forky | sid)
|
||||||
|
# Testing/unstable releases fallback to latest stable suite
|
||||||
|
suite="bookworm"
|
||||||
|
;;
|
||||||
|
bookworm)
|
||||||
|
suite="bookworm"
|
||||||
|
;;
|
||||||
|
bullseye)
|
||||||
|
suite="bullseye"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Unknown release: fallback to latest stable suite
|
||||||
|
msg_warn "Unknown Debian release '${distro_codename}', using bookworm"
|
||||||
|
suite="bookworm"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
elif [[ "$distro_id" == "ubuntu" ]]; then
|
||||||
|
case "$distro_codename" in
|
||||||
|
oracular | plucky)
|
||||||
|
# Newer releases fallback to latest LTS
|
||||||
|
suite="noble"
|
||||||
|
;;
|
||||||
|
noble)
|
||||||
|
suite="noble"
|
||||||
|
;;
|
||||||
|
jammy)
|
||||||
|
suite="jammy"
|
||||||
|
;;
|
||||||
|
focal)
|
||||||
|
suite="focal"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Unknown release: fallback to latest LTS
|
||||||
|
msg_warn "Unknown Ubuntu release '${distro_codename}', using noble"
|
||||||
|
suite="noble"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
# For other distros, try generic fallback
|
||||||
suite=$(get_fallback_suite "$distro_id" "$distro_codename" "$repo_url")
|
suite=$(get_fallback_suite "$distro_id" "$distro_codename" "$repo_url")
|
||||||
|
fi
|
||||||
|
|
||||||
repo_component="main"
|
repo_component="main"
|
||||||
[[ "$distro_id" == "ubuntu" ]] && repo_component="multiverse"
|
[[ "$distro_id" == "ubuntu" ]] && repo_component="multiverse"
|
||||||
|
|||||||
Reference in New Issue
Block a user