dom0-updates: clean local repo when --clean given

This commit is contained in:
Marek Marczykowski-Górecki 2014-05-12 00:30:48 +02:00
parent 15207dadcc
commit a7c43e6148

View File

@ -27,12 +27,15 @@ GUI=
CHECK_ONLY=
ALL_OPTS=$*
QVMRUN_OPTS=
CLEAN=
# Filter out some yum options and collect packages list
while [ $# -gt 0 ]; do
case "$1" in
--enablerepo=*|\
--disablerepo=*|\
--disablerepo=*)
;;
--clean)
CLEAN=1
;;
--gui)
GUI=1
@ -71,6 +74,10 @@ if [ "$CHECK_ONLY" == "1" ] && ! xl domid $UPDATEVM > /dev/null 2>&1; then
exit 1
fi
if [ -n "$CLEAN" ]; then
rm -f /var/lib/qubes/updates/rpm/*
fi
# We should ensure the clocks in Dom0 and UpdateVM are in sync
# becuase otherwise yum might complain about future timestamps
qvm-sync-clock