From 5b57ea3d14fdc93f0e937fb499b7b5880e258bce Mon Sep 17 00:00:00 2001 From: z4yx Date: Wed, 22 Apr 2020 11:46:41 +0800 Subject: [PATCH] show packages to be deleted in mongodb and mysql --- mongodb.sh | 9 +++++---- mysql.sh | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/mongodb.sh b/mongodb.sh index 1b7c7ad..1990fe3 100755 --- a/mongodb.sh +++ b/mongodb.sh @@ -27,10 +27,11 @@ done popd echo "YUM finished" -for mgver in ${MONGO_VERSIONS[@]}; do - "$apt_sync" "$BASE_URL/apt/ubuntu" "@{ubuntu-lts}/mongodb-org/$mgver" multiverse amd64,i386 "$UBUNTU_PATH" - "$apt_sync" "$BASE_URL/apt/debian" "@{debian-current}/mongodb-org/$mgver" main amd64,i386 "$DEBIAN_PATH" -done +components=$(printf ",@{ubuntu-lts}/mongodb-org/%s" "${MONGO_VERSIONS[@]}") +"$apt_sync" --delete-dry-run "$BASE_URL/apt/ubuntu" "${components:1}" multiverse amd64,i386 "$UBUNTU_PATH" +components=$(printf ",@{debian-current}/mongodb-org/%s" "${MONGO_VERSIONS[@]}") +"$apt_sync" --delete-dry-run "$BASE_URL/apt/debian" "${components:1}" main amd64,i386 "$DEBIAN_PATH" + for dist in "$BASE_URL"/apt/*/dists/*/mongodb-org/; do stable=${STABLE_VERSION} if [[ $dist == *"trusty"* || $dist == *"jessie"* ]]; then diff --git a/mysql.sh b/mysql.sh index 0042720..2bbc62d 100755 --- a/mysql.sh +++ b/mysql.sh @@ -27,9 +27,9 @@ mkdir -p ${YUM_PATH} ${UBUNTU_PATH} ${DEBIAN_PATH} # =================== APT repos =============================== MYSQL_APT_REPOS="mysql-5.6,mysql-5.7,mysql-tools,connector-python-2.1,mysql-8.0" -"$apt_sync" "${BASE_URL}/apt/ubuntu" @ubuntu-lts $MYSQL_APT_REPOS amd64,i386 "${UBUNTU_PATH}" +"$apt_sync" --delete-dry-run "${BASE_URL}/apt/ubuntu" @ubuntu-lts $MYSQL_APT_REPOS amd64,i386 "${UBUNTU_PATH}" echo "Ubuntu finished" -"$apt_sync" "${BASE_URL}/apt/debian" @debian-current $MYSQL_APT_REPOS amd64,i386 "${DEBIAN_PATH}" +"$apt_sync" --delete-dry-run "${BASE_URL}/apt/debian" @debian-current $MYSQL_APT_REPOS amd64,i386 "${DEBIAN_PATH}" echo "Debian finished" # =================== YUM/DNF repos ==========================