From 919dc49000c8484360ceff5dd91b470ffcdc2aef Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Fri, 22 Jan 2021 14:28:26 -0500 Subject: [PATCH] =?UTF-8?q?Avoid=20passing=20dom0-provided=20options=20to?= =?UTF-8?q?=20=E2=80=98dnf=20clean=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are useless and can cause errors. --- package-managers/qubes-download-dom0-updates.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package-managers/qubes-download-dom0-updates.sh b/package-managers/qubes-download-dom0-updates.sh index 3dbf51c..c138217 100755 --- a/package-managers/qubes-download-dom0-updates.sh +++ b/package-managers/qubes-download-dom0-updates.sh @@ -13,6 +13,7 @@ elif [ -f "$DOM0_UPDATES_DIR/etc/yum.conf" ]; then fi # DNF uses /etc/yum.repos.d, even when --installroot is specified OPTS+=("--setopt=reposdir=$DOM0_UPDATES_DIR/etc/yum.repos.d") +CLEAN_OPTS=("${OPTS[@]}") # DNF verifies signatures implicitly, but yumdownloader does not. SIGNATURE_REGEX="" PKGLIST=() @@ -84,7 +85,7 @@ rpm --root=$DOM0_UPDATES_DIR --rebuilddb if [ "$CLEAN" = "1" ]; then # shellcheck disable=SC2086 - "${YUM[@]}" "${OPTS[@]}" clean all + "${YUM[@]}" "${CLEAN_OPTS[@]}" clean all rm -f "$DOM0_UPDATES_DIR"/packages/* rm -rf "$DOM0_UPDATES_DIR"/var/cache/* fi