fedorize-image: clean yum cache before install

This is mostly required for template-builder-repo, in which packages can be
rebuild without version change (so rpm hash will be different). In case of image update (instead of fresh install) cache can contain outdated information.

This is especially needed before qubeize_image, which install packages from
this repo, but one package in fedorize_image (qubes-vm-kernel-placeholder) is
installed at this stage. In any case fedorize_images is always called just
before qubeize_image, so one yum clean is enough.
This commit is contained in:
Marek Marczykowski 2012-11-17 12:16:54 +01:00
parent 836355d0ee
commit bf43862f3b

View File

@ -52,6 +52,7 @@ mount -t proc proc mnt/proc
PKGGROUPS=$(cat $PKGLISTFILE) PKGGROUPS=$(cat $PKGLISTFILE)
export YUM0=$PWD/yum_repo_qubes export YUM0=$PWD/yum_repo_qubes
echo "-> Installing package groups..." echo "-> Installing package groups..."
yum clean all -c $PWD/yum.conf $YUM_OPTS -y --installroot=$PWD/mnt
yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR $PKGGROUPS || RETCODE=1 yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR $PKGGROUPS || RETCODE=1
yum update -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR || RETCODE=1 yum update -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR || RETCODE=1