vm/qubes-dom0-update: rebuild dom0 rpmdb before touching it with yum

Dom0 can have different (older) rpmdb version than VM. Starting from FC17 yum
refuses to work without rebuild.
This commit is contained in:
Marek Marczykowski 2012-06-13 01:59:25 +02:00
parent 28ad001375
commit e2a0c22299

View File

@ -43,6 +43,10 @@ fi
mkdir -p $DOM0_UPDATES_DIR/etc
sed -i '/^reposdir\s*=/d' $DOM0_UPDATES_DIR/etc/yum.conf
# Rebuild rpm database in case of different rpm version
rm -f $DOM0_UPDATES_DIR/var/lib/rpm/__*
rpm --root=$DOM0_UPDATES_DIR --rebuilddb
if [ "$CLEAN" = "1" ]; then
yum $OPTS clean all
rm -f $DOM0_UPDATES_DIR/packages/*