Skip to content

Commit 576fa4f

Browse files
committed
dom0-update: don't fail if there is nothing to install
Do not fail the whole qubes-dom0-update call if download completed with exit code 0 but didn't sent any packages. This usually means the requested package is already installed. Fixes QubesOS/qubes-issues#10316
1 parent be5ab64 commit 576fa4f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

dom0-updates/qubes-dom0-update

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,11 @@ fi
472472

473473
if [ ${#PKGS[@]} -gt 0 ]; then
474474

475-
dnf $YUM_ACTION "${YUM_OPTS[@]}" "${PKGS[@]}" ; RETCODE=$?
475+
if [ -f /var/lib/qubes/updates/repodata/repomd.xml ]; then
476+
dnf $YUM_ACTION "${YUM_OPTS[@]}" "${PKGS[@]}" ; RETCODE=$?
477+
else
478+
echo "Nothing downloaded" >&2
479+
fi
476480

477481
elif [ -f /var/lib/qubes/updates/repodata/repomd.xml ]; then
478482
# Above file exists only when at least one package was downloaded

0 commit comments

Comments
 (0)