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:
parent
55971717b6
commit
bfeb9d9e99
10
diskimage_builder/elements/zypper/post-install.d/98-zypper-clean-cache
Executable file
10
diskimage_builder/elements/zypper/post-install.d/98-zypper-clean-cache
Executable 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
|
Loading…
Reference in New Issue
Block a user