Enable saving of rpms

We currently map in the cache dir, but it only saves the metadata. The
improvements would come with the rpm saving as well. In order to have
that, we need to set keepcache=1 which is disabled by default. We can
enable this on the command line via --setopt so we don't have to touch
the container yum configuration.

Change-Id: Ia274dbbad9a220e52b2cfa554dede3bf40055f98
This commit is contained in:
Alex Schultz 2019-09-30 15:54:57 -06:00
parent d28803f403
commit 2261d850a7
1 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,9 @@ if $(! echo $installed | grep -qw $plugin) && $($PKG list available $plugin >/de
$PKG install -y $plugin
fi
$PKG -y update $packages_for_update
YUM_OPTS="{% if yum_cache is defined and yum_cache %}--setopt=keepcache=1{% endif %}"
$PKG -y update $YUM_OPTS $packages_for_update
{% if yum_cache is defined and yum_cache %}
sync
{% else %}