From cd263549455ada3e812c0c9b1b3d4c18c9af5641 Mon Sep 17 00:00:00 2001 From: Vladimir Lushnikov Date: Sat, 7 Apr 2018 22:25:55 +0100 Subject: [PATCH] Problem: Unable to use pkg.install with Salt in dom0 when using UpdateVM that has only yum due to incorrect options passed by Salt assuming dnf presence Solution: Filter out invalid yum options when dnf is not found in UpdateVM Fixes QubesOS/qubes-issues#2223 --- misc/qubes-download-dom0-updates.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/qubes-download-dom0-updates.sh b/misc/qubes-download-dom0-updates.sh index d5a36c4..4abe8b2 100755 --- a/misc/qubes-download-dom0-updates.sh +++ b/misc/qubes-download-dom0-updates.sh @@ -53,6 +53,9 @@ fi YUM="yum" if type dnf >/dev/null 2>&1; then YUM="dnf --best --allowerasing --noplugins" +else + # salt in dom0 thinks it's using dnf but we only have yum so need to remove extra options + OPTS="${OPTS/--best --allowerasing/}" fi if ! [ -d "$DOM0_UPDATES_DIR" ]; then