diskimage-builder/elements/zypper/root.d/50-zypper-cache
Monty Taylor 3acc866f6d Use DIB_IMAGE_CACHE everywhere
disk-image-create processes a DIB_IMAGE_CACHE variable and exports it,
but there are several elements that ignore the value and wrote out
the base location themselves. Use the variable everywhere so that it
will get overridden everywhere.

Change-Id: I00fff354d6c931ad67cf3052d055f0e4604dfdc8
2014-10-05 13:58:32 -07:00

13 lines
242 B
Bash
Executable File

#!/bin/bash
set -eu
set -o pipefail
[ -n "$TARGET_ROOT" ]
ZYPPER_CACHE_DIR=$DIB_IMAGE_CACHE/zypper
mkdir -p $ZYPPER_CACHE_DIR
sudo mkdir -p $TMP_MOUNT_PATH/var/cache/zypp
sudo mount --bind $ZYPPER_CACHE_DIR $TMP_MOUNT_PATH/var/cache/zypp