Merge "Don't cache debootstrap rootfs by default"

This commit is contained in:
Jenkins 2016-03-16 00:06:18 +00:00 committed by Gerrit Code Review
commit 3fca968164
2 changed files with 8 additions and 1 deletions

View File

@ -25,6 +25,11 @@ pass extra arguments to the debootstrap command used to create the
base filesystem image. If --keyring is is used in `DIB_DEBOOTSTRAP_EXTRA_ARGS`,
it will override `DIB_APT_KEYRING` if that is used as well.
The `DIB_DEBOOTSTRAP_CACHE` variable can be used to cache the created root
filesystem. By default this is 0 (disabled) and any other value enables this.
If run in offline mode then the most recently cached rootfs is used instead of
being built.
-------------------
Note on ARM systems
-------------------

View File

@ -72,7 +72,9 @@ else
${DIB_DEBIAN_DEBOOTSTRAP_SCRIPT:-}"
echo Caching debootstrap result in $DEBOOTSTRAP_TARBALL
sudo tar --numeric-owner -C $TARGET_ROOT -zcf $DEBOOTSTRAP_TARBALL --exclude='./tmp/*' .
if [ "${DIB_DEBOOTSTRAP_CACHE:-0}" != "0" ]; then
sudo tar --numeric-owner -C $TARGET_ROOT -zcf $DEBOOTSTRAP_TARBALL --exclude='./tmp/*' .
fi
fi
sudo rm -f ${TARGET_ROOT}/.extra_settings