diskimage-builder/elements/zypper/root.d/50-zypper-cache
Ralf Haferkamp f8a0715c56 Add zypper element
This provides some customizations for zypper based distributions (e.g.
openSUSE and SLES). It is heavily inspired by the yum element and sets up
zypper to cache downloaded package outside of the chroot so that they can be
reused to speed up subsequent builds.

Change-Id: I775c921ee19cf7d1180fb68c1b7857ea6245a77d
2013-12-11 17:09:24 +01:00

11 lines
185 B
Bash
Executable File

#!/bin/bash
set -e
[ -n "$TARGET_ROOT" ]
ZYPPER_CACHE_DIR=~/.cache/image-create/zypper
mkdir -p $ZYPPER_CACHE_DIR
sudo mount --bind $ZYPPER_CACHE_DIR $TMP_MOUNT_PATH/var/cache/zypp