From d57804b6a0666631270e44565e313c83eb1e652e Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Mon, 12 Sep 2011 14:36:53 +0200 Subject: [PATCH] vm: allow clean yum cache for dom0 updates (#346) --- common/qubes_download_dom0_updates.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/qubes_download_dom0_updates.sh b/common/qubes_download_dom0_updates.sh index e56d3ac5..c30e5bf6 100755 --- a/common/qubes_download_dom0_updates.sh +++ b/common/qubes_download_dom0_updates.sh @@ -4,6 +4,7 @@ DOM0_UPDATES_DIR=/var/lib/qubes/dom0-updates DOIT=0 GUI=1 +CLEAN=0 OPTS="--installroot $DOM0_UPDATES_DIR" PKGLIST= while [ -n "$1" ]; do @@ -14,6 +15,9 @@ while [ -n "$1" ]; do --nogui) GUI=0 ;; + --clean) + CLEAN=1 + ;; -*) OPTS="$OPTS $1" ;; @@ -32,6 +36,10 @@ fi mkdir -p $DOM0_UPDATES_DIR/etc cp /etc/yum.conf $DOM0_UPDATES_DIR/etc/ +if [ "x$CLEAN" = "1" ]; then + yum $OPTS clean all +fi + if [ "x$PKGLIST" = "x" ]; then echo "Checking for dom0 updates..." PKGLIST=`yum $OPTS check-update -q | cut -f 1 -d ' '`