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
This commit is contained in:
Monty Taylor 2014-10-05 13:55:34 -07:00
parent 07f11be024
commit 3acc866f6d
6 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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