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
This commit is contained in:
Vladimir Lushnikov 2018-04-07 22:25:55 +01:00
parent 7fa3c51fd2
commit cd26354945
No known key found for this signature in database
GPG Key ID: 293588E6092E235A

View File

@ -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