zypper: Clean caches and don't cache packages locally

For builds inside the infra, we don't want to pack the cache
inside the image (as it might be different at the time the image
runs). In an opensuse-minimal image this saves about 10MB of image
size.

Change-Id: I5ecabd46f0a662798bda3e4468395ad8308d0055
This commit is contained in:
Dirk Mueller 2017-07-23 14:35:07 +02:00
parent 55971717b6
commit bfeb9d9e99

View file

@ -0,0 +1,10 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# clean all locally cached metadata
sudo zypper clean -a