Merge "Use DIB_IMAGE_CACHE in dpkg element"

This commit is contained in:
Jenkins 2015-02-03 20:56:27 +00:00 committed by Gerrit Code Review
commit 1b2017914c
2 changed files with 2 additions and 2 deletions

View File

@ -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. 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 * 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 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 /var/cache/apt/archives, this to cache the .deb files downloaded during the image
creation. creation.

View File

@ -9,7 +9,7 @@ if [ $DIB_APT_LOCAL_CACHE = "0" ]; then
exit 0 exit 0
fi 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 if [ ! -d $apt_cache_dir ]; then
mkdir -p $apt_cache_dir mkdir -p $apt_cache_dir
fi fi