Fix MongoDB repo verification and component setup

Simplifies the arguments passed to verify_repo_available by removing the MongoDB version and org path from the suite parameter. Also sets the repository component to 'main' instead of using the variable REPO_COMPONENT.
This commit is contained in:
CanbiZ 2025-10-22 16:53:38 +02:00
parent 55120ae165
commit e6bd1b5759

View File

@ -2405,10 +2405,10 @@ function setup_mongodb() {
esac
# Verify the repository is available
if ! verify_repo_available "$MONGO_BASE_URL" "${SUITE}/mongodb-org/${MONGO_VERSION}"; then
if ! verify_repo_available "$MONGO_BASE_URL" "$SUITE"; then
msg_warn "MongoDB repo not available for ${DISTRO_ID}-${SUITE}, trying bookworm fallback"
SUITE="bookworm"
if ! verify_repo_available "$MONGO_BASE_URL" "${SUITE}/mongodb-org/${MONGO_VERSION}"; then
if ! verify_repo_available "$MONGO_BASE_URL" "$SUITE"; then
msg_error "MongoDB repository not available for ${DISTRO_ID}-${DISTRO_CODENAME} (tried ${DISTRO_CODENAME} and bookworm)"
return 1
fi
@ -2425,7 +2425,7 @@ function setup_mongodb() {
Types: deb
URIs: ${MONGO_BASE_URL}
Suites: ${SUITE}/mongodb-org/${MONGO_VERSION}
Components: ${REPO_COMPONENT}
Components: main
Architectures: amd64 arm64
Signed-By: /etc/apt/keyrings/mongodb-${MONGO_VERSION}.gpg
EOF