Fix MongoDB repo suite handling for new Debian versions
Adds explicit mapping of 'trixie', 'forky', and 'sid' to 'bookworm' for MongoDB repository setup. Improves error handling by failing early if the repository is unavailable, instead of attempting a fallback.
This commit is contained in:
parent
9c39c9cd67
commit
6d7c318dec
@ -2382,14 +2382,19 @@ function setup_mongodb() {
|
||||
cleanup_old_repo_files "mongodb-org-${MONGO_VERSION}"
|
||||
cleanup_orphaned_sources
|
||||
|
||||
# Determine working suite dynamically via helper
|
||||
local SUITE
|
||||
case "$DISTRO_CODENAME" in
|
||||
trixie | forky | sid)
|
||||
SUITE="bookworm"
|
||||
;;
|
||||
*)
|
||||
SUITE=$(get_fallback_suite "$DISTRO_ID" "$DISTRO_CODENAME" "$MONGO_BASE_URL")
|
||||
;;
|
||||
esac
|
||||
|
||||
# Double-check availability (handles future distro changes automatically)
|
||||
if ! verify_repo_available "$MONGO_BASE_URL" "$SUITE"; then
|
||||
msg_warn "MongoDB repo not found for ${DISTRO_ID}-${SUITE}, falling back via get_fallback_suite"
|
||||
SUITE=$(get_fallback_suite "$DISTRO_ID" "$SUITE" "$MONGO_BASE_URL")
|
||||
msg_error "MongoDB repository not available for ${DISTRO_ID}-${SUITE}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
mkdir -p /etc/apt/keyrings
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user