Avoid passing dom0-provided options to ‘dnf clean’

They are useless and can cause errors.
This commit is contained in:
Demi Marie Obenour 2021-01-22 14:28:26 -05:00
parent 9801dd7d16
commit 919dc49000
No known key found for this signature in database
GPG Key ID: 28A45C93B0B5B6E0

View File

@ -13,6 +13,7 @@ elif [ -f "$DOM0_UPDATES_DIR/etc/yum.conf" ]; then
fi fi
# DNF uses /etc/yum.repos.d, even when --installroot is specified # DNF uses /etc/yum.repos.d, even when --installroot is specified
OPTS+=("--setopt=reposdir=$DOM0_UPDATES_DIR/etc/yum.repos.d") OPTS+=("--setopt=reposdir=$DOM0_UPDATES_DIR/etc/yum.repos.d")
CLEAN_OPTS=("${OPTS[@]}")
# DNF verifies signatures implicitly, but yumdownloader does not. # DNF verifies signatures implicitly, but yumdownloader does not.
SIGNATURE_REGEX="" SIGNATURE_REGEX=""
PKGLIST=() PKGLIST=()
@ -84,7 +85,7 @@ rpm --root=$DOM0_UPDATES_DIR --rebuilddb
if [ "$CLEAN" = "1" ]; then if [ "$CLEAN" = "1" ]; then
# shellcheck disable=SC2086 # shellcheck disable=SC2086
"${YUM[@]}" "${OPTS[@]}" clean all "${YUM[@]}" "${CLEAN_OPTS[@]}" clean all
rm -f "$DOM0_UPDATES_DIR"/packages/* rm -f "$DOM0_UPDATES_DIR"/packages/*
rm -rf "$DOM0_UPDATES_DIR"/var/cache/* rm -rf "$DOM0_UPDATES_DIR"/var/cache/*
fi fi