From 58cfb6fd1d61d558ee763ac5650bd56769f4fb69 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 20 Aug 2010 15:55:18 +0100 Subject: [PATCH] Add a series of checkpoints where the current time is logged. --- debian/changelog | 6 ++++++ livecd.sh | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/debian/changelog b/debian/changelog index b6182450..cd1d8a91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (1.146) UNRELEASED; urgency=low + + * Add a series of checkpoints where the current time is logged. + + -- Colin Watson Fri, 20 Aug 2010 15:53:45 +0100 + livecd-rootfs (1.145) maverick; urgency=low * raise inode count during ext2fs build to be able to use the full size of diff --git a/livecd.sh b/livecd.sh index e12aeefc..8803f771 100755 --- a/livecd.sh +++ b/livecd.sh @@ -100,11 +100,19 @@ livefs_ext2() chmod 644 livecd.${FSS}.ext2 } +checkpoint() +{ + echo "===== $1 =====" + date +} + if [ $(id -u) != 0 ];then echo "must be run as root" exit 2 fi +checkpoint "Starting build" + umask 022 export TTY=unknown export TERM=vt100 @@ -330,6 +338,7 @@ Flags: seen esac dpkg -l livecd-rootfs || true # get our version # in the log. + checkpoint "Bootstrapping base system" debootstrap --components=$(echo $COMP | sed 's/ /,/g') --arch $TARGETARCH $STE $ROOT $MIRROR # Recent dpkg has started complaining pretty loudly if dev/pts isn't @@ -439,6 +448,7 @@ Pin-Priority: 991 fi # Create a good sources.list, and finish the install + checkpoint "Configuring APT" echo deb $MIRROR $STE ${COMP} > ${ROOT}etc/apt/sources.list echo deb $MIRROR ${STE}-security ${COMP} >> ${ROOT}etc/apt/sources.list echo deb $MIRROR ${STE}-updates ${COMP} >> ${ROOT}etc/apt/sources.list @@ -493,12 +503,15 @@ Pin-Priority: 900 cat /etc/apt/trusted.gpg >> ${ROOT}etc/apt/trusted.gpg chroot $ROOT apt-get update + checkpoint "Upgrading" chroot $ROOT apt-get -y $FORCE_YES --purge dist-upgrade livecd.${FSS}.manifest-headers chroot ${ROOT} dpkg -l linux-headers-\* | grep ^i | awk '{print $2}' \ @@ -515,6 +528,7 @@ Pin-Priority: 900 chroot ${ROOT} dpkg-query -W --showformat='${Package} ${Version}\n' \ > livecd.${FSS}.manifest-desktop + checkpoint "Installing live packages" chroot $ROOT apt-get -y --purge install $LIVELIST livecd.${FSS}.manifest + + checkpoint "Cleaning up" + kill_users chroot $ROOT /etc/cron.daily/mlocate || true @@ -681,12 +698,14 @@ Pin-Priority: 550 rm -f ${ROOT}/var/cache/debconf/*-old # show the size of directories in /usr/share/doc + checkpoint "Checking size of /usr/share/doc" echo BEGIN docdirs (cd $ROOT && find usr/share/doc -maxdepth 1 -type d | xargs du -s | sort -nr) echo END docdirs # search for duplicate files, write the summary to stdout, if which fdupes >/dev/null 2>&1; then + checkpoint "Checking for duplicate files" echo "first line: " echo "data lines: [ ...]" echo BEGIN fdupes @@ -710,10 +729,12 @@ Pin-Priority: 550 # . However, we would like to cache this # number for partman's sufficient free space check and ubiquity's # installation progress calculation. + checkpoint "Calculating total size" printf $(du -sx --block-size=1 ${ROOT} | cut -f1) > livecd.${FSS}.size || true # Build our images + checkpoint "Building image" if [ "$IMAGEFORMAT" = "ext2" ] || [ "$IMAGEFORMAT" = "ext3" ]; then livefs_ext2 else @@ -732,6 +753,7 @@ Pin-Priority: 550 case $FS in edubuntu-dvd) if [ "$TARGETARCH" = "i386" ]; then + checkpoint "Building LTSP chroot" ltsp-build-client --base $(pwd) --mirror $MIRROR --arch $TARGETARCH --dist $STE --chroot ltsp-live --purge-chroot --skipimage mkdir -p $(pwd)/images mksquashfs $(pwd)/ltsp-live $(pwd)/images/ltsp-live.img -noF -noD -noI -no-exports -e cdrom @@ -747,3 +769,5 @@ Pin-Priority: 550 ;; esac done + +checkpoint "Done"