Skip to content

Commit e6bd1b5

Browse files
committed
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.
1 parent 55120ae commit e6bd1b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

misc/tools.func

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,10 +2405,10 @@ function setup_mongodb() {
24052405
esac
24062406

24072407
# Verify the repository is available
2408-
if ! verify_repo_available "$MONGO_BASE_URL" "${SUITE}/mongodb-org/${MONGO_VERSION}"; then
2408+
if ! verify_repo_available "$MONGO_BASE_URL" "$SUITE"; then
24092409
msg_warn "MongoDB repo not available for ${DISTRO_ID}-${SUITE}, trying bookworm fallback"
24102410
SUITE="bookworm"
2411-
if ! verify_repo_available "$MONGO_BASE_URL" "${SUITE}/mongodb-org/${MONGO_VERSION}"; then
2411+
if ! verify_repo_available "$MONGO_BASE_URL" "$SUITE"; then
24122412
msg_error "MongoDB repository not available for ${DISTRO_ID}-${DISTRO_CODENAME} (tried ${DISTRO_CODENAME} and bookworm)"
24132413
return 1
24142414
fi
@@ -2425,7 +2425,7 @@ function setup_mongodb() {
24252425
Types: deb
24262426
URIs: ${MONGO_BASE_URL}
24272427
Suites: ${SUITE}/mongodb-org/${MONGO_VERSION}
2428-
Components: ${REPO_COMPONENT}
2428+
Components: main
24292429
Architectures: amd64 arm64
24302430
Signed-By: /etc/apt/keyrings/mongodb-${MONGO_VERSION}.gpg
24312431
EOF

0 commit comments

Comments
 (0)