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.
Now it prints (almost) only custom echos and yum messages. The later one gives
some (nicely formatted) progress of very time-consuming package download and
installation.
This would simplify changes in package list and (more important) make
template-builder independent of layout of other repos (eg location of version
file).
Some rpm %post scripts fails when /dev is empty. Especially lpstat crashes when
/dev/random is missing, which caused yum hang on some rpms installation.