From fa9ebfb6d13d8dfed739dc74ad4c28110a4103f1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 16 Oct 2009 18:35:28 +0200 Subject: Using pre-cached bootstrap stage, if available, in order to build chroot image which dramatically speads up building of large images. --- helpers/lh_binary_chroot | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'helpers/lh_binary_chroot') diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot index 1591c2518..20239419a 100755 --- a/helpers/lh_binary_chroot +++ b/helpers/lh_binary_chroot @@ -84,8 +84,16 @@ ${LH_ROOT_COMMAND} rm -rf chroot/chroot ${LH_ROOT_COMMAND} rm -rf chroot.tmp # Copying new chroot -${LH_ROOT_COMMAND} cp -a chroot chroot.tmp -${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot +if [ -d cache/stages_bootstrap ] +then + ${LH_ROOT_COMMAND} mv chroot chroot.tmp + ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot + ${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot + ${LH_ROOT_COMMAND} touch chroot/chroot.cache +else + ${LH_ROOT_COMMAND} cp -a chroot chroot.tmp + ${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot +fi if [ -f config/binary_rootfs/exclude ] then -- cgit v1.2.3