From 72b1c53fbd7c0d5c00a879ffd88744d00419337d Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 17 Aug 2008 19:44:46 +0200 Subject: [PATCH] Display progress of squashfs --- debian/changelog | 4 +++- grml-live | 32 +++++++++++++++++++++----------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index ecffab1..b4a9334 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,8 +27,10 @@ grml-live (0.9) unstable; urgency=low * Display SQUASHFS_OPTIONS in configuration overview. * Make sure it's possible to get usage information without being root or actually executing the script. + * Display progress of squashfs, when building via a buildsystem + just set -no-progress in $SQUASHFS_OPTIONS instead. - -- Michael Prokop Sun, 17 Aug 2008 13:19:24 +0200 + -- Michael Prokop Sun, 17 Aug 2008 19:41:25 +0200 grml-live (0.8) unstable; urgency=low diff --git a/grml-live b/grml-live index f432721..2acc7b2 100755 --- a/grml-live +++ b/grml-live @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Sun Aug 17 13:19:16 CEST 2008 [mika] +# Latest change: Sun Aug 17 19:44:27 CEST 2008 [mika] ################################################################################ # read configuration files, set some misc variables {{{ @@ -587,18 +587,28 @@ else mksquashfs --help 2>&1 | grep -q -- "$SQUASHFS_ZLIB" || SQUASHFS_ZLIB='' fi - # execute squashfs: - if mksquashfs --help 2>&1 | grep -q -- -no-progress ; then - log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend -no-progress $SQUASHFS_OPTIONS $SQUASHFS_ZLIB" - mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/"${GRML_NAME}".squashfs -noappend -no-progress $SQUASHFS_OPTIONS $SQUASHFS_ZLIB - else - log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB" - mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/"${GRML_NAME}".squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB + if echo "$SQUASHFS_OPTIONS" | grep -q -- "-nolzma" ; then + ewarn "mksquashfs does NOT support the nolzma option, falling back to zlib mode." + SQUASHFS_OPTIONS="$(echo $SQUASHFS_OPTIONS | sed 's/-nolzma//g')" + eend 0 fi - echo "${GRML_NAME}.squashfs" > $BUILD_OUTPUT/live/filesystem.module - log "Finished execution of stage 'squashfs' [$(date)]" - einfo "Finished execution of stage 'squashfs'" ; eend 0 + SQUASHFS_OUTPUT="$(mktemp -t grml-live.XXXXXX)" + log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB" + if mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/"${GRML_NAME}".squashfs \ + -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB 2>"${SQUASHFS_OUTPUT}" ; then + echo "${GRML_NAME}.squashfs" > $BUILD_OUTPUT/live/filesystem.module + log "Finished execution of stage 'squashfs' [$(date)]" + einfo "Finished execution of stage 'squashfs'" ; eend 0 + rm -f "${SQUASHFS_OUTPUT}" + else + log "There was an error executing stage 'squashfs' [$(date)]:" + log "$(cat $SQUASHFS_OUTPUT)" + eerror "There was an error executing stage 'squashfs':" ; eend 1 + cat "${SQUASHFS_OUTPUT}" + rm -f "${SQUASHFS_OUTPUT}" + bailout + fi fi # create md5sum file: -- 2.1.4