diff --git a/elements/base/root.d/01-ccache b/elements/base/root.d/01-ccache index 67b7e250f..0bb2cd251 100755 --- a/elements/base/root.d/01-ccache +++ b/elements/base/root.d/01-ccache @@ -9,7 +9,7 @@ set -o pipefail # after automatically pulling in the Ubuntu element) grep " $TMP_MOUNT_PATH/tmp/ccache" /proc/mounts && exit -DIB_CCACHE_DIR=${DIB_CCACHE_DIR:-$HOME/.cache/image-create/ccache} +DIB_CCACHE_DIR=${DIB_CCACHE_DIR:-$DIB_IMAGE_CACHE/ccache} mkdir -p $DIB_CCACHE_DIR sudo mkdir -p $TMP_MOUNT_PATH/tmp/ccache diff --git a/elements/pip-cache/root.d/01-pip-cache b/elements/pip-cache/root.d/01-pip-cache index c3e37bdde..fcb29f911 100755 --- a/elements/pip-cache/root.d/01-pip-cache +++ b/elements/pip-cache/root.d/01-pip-cache @@ -3,7 +3,7 @@ set -eu set -o pipefail -PIP_CACHE_DIR=$HOME/.cache/image-create/pip +PIP_CACHE_DIR=$DIB_IMAGE_CACHE/pip mkdir -p $PIP_CACHE_DIR sudo mkdir -p $TMP_MOUNT_PATH/tmp/pip diff --git a/elements/pypi/extra-data.d/00-mount-pypi-mirror b/elements/pypi/extra-data.d/00-mount-pypi-mirror index 0a3edd82a..74c0f27e2 100755 --- a/elements/pypi/extra-data.d/00-mount-pypi-mirror +++ b/elements/pypi/extra-data.d/00-mount-pypi-mirror @@ -3,7 +3,7 @@ set -eu set -o pipefail -MIRROR_SOURCE=~/.cache/image-create/pypi/mirror/ +MIRROR_SOURCE=$DIB_IMAGE_CACHE/pypi/mirror/ if [ -d "$MIRROR_SOURCE" ]; then MIRROR_TARGET=$TMP_MOUNT_PATH/tmp/pypi diff --git a/elements/source-repositories/extra-data.d/98-source-repositories b/elements/source-repositories/extra-data.d/98-source-repositories index f28cbb9c3..c542cb0e0 100755 --- a/elements/source-repositories/extra-data.d/98-source-repositories +++ b/elements/source-repositories/extra-data.d/98-source-repositories @@ -197,8 +197,8 @@ function get_repos_for_element(){ done < $REPO_SOURCES } -CACHE_BASE=~/.cache/image-create/source-repositories -OLD_CACHE_BASE=~/.cache/image-create/repository-sources +CACHE_BASE=$DIB_IMAGE_CACHE/source-repositories +OLD_CACHE_BASE=$DIB_IMAGE_CACHE/repository-sources make_new_cache $OLD_CACHE_BASE $CACHE_BASE mkdir -p $CACHE_BASE # Use the IMAGE_NAME from the calling script, and make it unique with the temporary path diff --git a/elements/yum/root.d/50-yum-cache b/elements/yum/root.d/50-yum-cache index 1453db098..9281b95e2 100755 --- a/elements/yum/root.d/50-yum-cache +++ b/elements/yum/root.d/50-yum-cache @@ -5,7 +5,7 @@ set -o pipefail [ -n "$TARGET_ROOT" ] -YUM_CACHE_DIR=~/.cache/image-create/yum +YUM_CACHE_DIR=$DIB_IMAGE_CACHE/yum mkdir -p $YUM_CACHE_DIR sudo mkdir -p $TMP_MOUNT_PATH/tmp/yum diff --git a/elements/zypper/root.d/50-zypper-cache b/elements/zypper/root.d/50-zypper-cache index 101dd7cb8..4cf6948d4 100755 --- a/elements/zypper/root.d/50-zypper-cache +++ b/elements/zypper/root.d/50-zypper-cache @@ -5,7 +5,7 @@ set -o pipefail [ -n "$TARGET_ROOT" ] -ZYPPER_CACHE_DIR=~/.cache/image-create/zypper +ZYPPER_CACHE_DIR=$DIB_IMAGE_CACHE/zypper mkdir -p $ZYPPER_CACHE_DIR sudo mkdir -p $TMP_MOUNT_PATH/var/cache/zypp