[SCM] live-helper branch, master, updated. 1.0.5-2-26-g476401a
Daniel Baumann
daniel at debian.org
Fri Oct 16 16:59:07 UTC 2009
The following commit has been merged in the master branch:
commit 476401a4c8dfb7240f173894c9537caeaef18ab0
Author: Daniel Baumann <daniel at debian.org>
Date: Fri Oct 16 18:35:28 2009 +0200
Using pre-cached bootstrap stage, if available, in order to build chroot image which dramatically speads up building of large images.
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index 1591c25..2023941 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
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index 1b72e7c..8ebb259 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -146,7 +146,15 @@ case "${LH_CHROOT_FILESYSTEM}" in
# Move image
mv chroot/filesystem.${LH_CHROOT_FILESYSTEM} binary/${INITFS}
- rm -rf chroot/chroot
+
+ if [ -e chroot/chroot.cache ]
+ then
+ mv chroot/chroot chroot.tmp
+ rm -rf chroot
+ mv chroot.tmp chroot
+ else
+ rm -rf chroot/chroot
+ fi
;;
disabled)
@@ -188,7 +196,15 @@ case "${LH_CHROOT_FILESYSTEM}" in
# Move image
mv chroot/filesystem.jffs2 binary/${INITFS}
- rm -rf chroot/chroot
+
+ if [ -e chroot/chroot.cache ]
+ then
+ mv chroot/chroot chroot.tmp
+ rm -rf chroot
+ mv chroot.tmp chroot
+ else
+ rm -rf chroot/chroot
+ fi
;;
disabled)
@@ -262,7 +278,17 @@ case "${LH_CHROOT_FILESYSTEM}" in
# Move image
${LH_ROOT_COMMAND} mv chroot/filesystem.squashfs binary/${INITFS}
- ${LH_ROOT_COMMAND} rm -rf chroot/chroot chroot/squashfs.sort
+ ${LH_ROOT_COMMAND} rm -f chroot/squashfs.sort
+
+ if [ -e chroot/chroot.cache ]
+ then
+ mv chroot/chroot chroot.tmp
+ rm -rf chroot
+ mv chroot.tmp chroot
+ else
+ rm -rf chroot/chroot
+ fi
+
${LH_ROOT_COMMAND} chmod 0644 binary/${INITFS}/filesystem.squashfs
;;
--
live-helper
More information about the debian-live-changes
mailing list