Merge "Add switch to turn on caching for debian element."

This commit is contained in:
Jenkins 2014-05-22 09:05:17 +00:00 committed by Gerrit Code Review
commit 2afe36eca8
2 changed files with 5 additions and 1 deletions

View File

@ -10,3 +10,7 @@ and pass it in via `DIB_DISTRIBUTION_MIRROR`.
Use of this element will also require the tool 'debootstrap' to be
available on your system. It should be available on Ubuntu, Debian,
and Fedora.
The `DIB_OFFLINE` or more specific `DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE`
variables can be set to prefer the use of a pre-cached root filesystem
tarball.

View File

@ -32,7 +32,7 @@ DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://http.debian.net/debian
http_proxy=${http_proxy:-}
set -x
if [ -n "$DIB_OFFLINE" ] && [ -f $DEBOOTSTRAP_TARBALL ] ; then
if [ -n "$DIB_OFFLINE" -o -n "${DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE:-}" ] && [ -f $DEBOOTSTRAP_TARBALL ] ; then
echo $DEBOOTSTRAP_TARBALL found in cache. Using.
sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DEBOOTSTRAP_TARBALL
else