From bab9595524d5f9cd116fe0d56a6c95fb3b51cc96 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 13 Jan 2015 14:22:10 -0800 Subject: [PATCH] Use DIB_IMAGE_CACHE in dpkg element The dpkg element was hardcoding ~/.cache/image-create as the cache path, but elements should use DIB_IMAGE_CACHE as the root for the cache to allow users to override the path. Replace the hardcoded path with one that is rooted at $DIB_IMAGE_CACHE. Change-Id: I76030654e7dfc7b7d4dfa87e082c14e7cee479b9 --- elements/dpkg/README.md | 2 +- elements/dpkg/root.d/99-shared_apt_cache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/dpkg/README.md b/elements/dpkg/README.md index 76f73ee4..864c9cb9 100644 --- a/elements/dpkg/README.md +++ b/elements/dpkg/README.md @@ -14,6 +14,6 @@ The dpkg specific version of install-packages is also kept here. added to the key ring before any apt-get commands take place. * DIB\_APT\_LOCAL\_CACHE: You can use this variable to disable the internal cache of the /var/cache/apt/archives directory by setting it to 0. The default is to bind - mount the ~/.cache/image-create/apt/$DISTRO_NAME directory in + mount the $DIB_IMAGE_CACHE/apt/$DISTRO_NAME directory in /var/cache/apt/archives, this to cache the .deb files downloaded during the image creation. diff --git a/elements/dpkg/root.d/99-shared_apt_cache b/elements/dpkg/root.d/99-shared_apt_cache index 049efc4b..1ad03d9c 100755 --- a/elements/dpkg/root.d/99-shared_apt_cache +++ b/elements/dpkg/root.d/99-shared_apt_cache @@ -9,7 +9,7 @@ if [ $DIB_APT_LOCAL_CACHE = "0" ]; then exit 0 fi -apt_cache_dir=$HOME/.cache/image-create/apt/$DISTRO_NAME +apt_cache_dir=$DIB_IMAGE_CACHE/apt/$DISTRO_NAME if [ ! -d $apt_cache_dir ]; then mkdir -p $apt_cache_dir fi