Improve checks for -[no]lzma for different squashfs-tools.
authorMichael Prokop <devnull@localhost>
Thu, 4 Sep 2008 11:29:10 +0000 (13:29 +0200)
committerMichael Prokop <devnull@localhost>
Thu, 4 Sep 2008 11:29:10 +0000 (13:29 +0200)
debian/changelog
grml-live

index d404d4f..4b60585 100644 (file)
@@ -1,9 +1,15 @@
+grml-live (0.9.2) unstable; urgency=low
+
+  * Improve checks for -[no]lzma for different squashfs-tools.
+
+ -- Michael Prokop <mika@grml.org>  Thu, 04 Sep 2008 13:28:48 +0200
+
 grml-live (0.9.1) unstable; urgency=low
 
   * Rebuild initramfs to make sure that the up2date /etc/grml_version
     is available in the live initramfs. [Closes: issue516]
 
- -- Michael Prokop <mika@grml.org>  Mon, 01 Sep 2008 23:51:50 +0200
+ -- Michael Prokop <mika@grml.org>  Thu, 04 Sep 2008 13:27:35 +0200
 
 grml-live (0.9.0) unstable; urgency=low
 
index 36190ad..37f688b 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -14,7 +14,7 @@ export LC_ALL=C
 # exit on any error:
 set -e
 
-GRML_LIVE_VERSION='0.9.1'
+GRML_LIVE_VERSION='0.9.2'
 PN="$(basename $0)"
 CMDLINE="$0 $@"
 ISO_DATE="$(date +%Y-%m-%d)"
@@ -423,7 +423,9 @@ else
       log "Setting /etc/grml_version to $GRML_NAME $VERSION Release Codename $RELEASENAME [$ISO_DATE]"
       echo "$GRML_NAME $VERSION Release Codename $RELEASENAME [$ISO_DATE]" > $CHROOT_OUTPUT/etc/grml_version
       chmod 644 $CHROOT_OUTPUT/etc/grml_version
+      einfo "Rebuilding initramfs"
       chroot $CHROOT_OUTPUT update-initramfs -u -t # make sure new /etc/grml_version reaches the initramfs
+      eend $?
    fi
 
    # Remove all FAI logs from chroot if class RELEASE is used:
@@ -601,9 +603,19 @@ else
    fi
 
    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
+      if ! mksquashfs --help 2>&1 | grep -q -- '-nolzma' ; then
+         ewarn "mksquashfs does NOT support the nolzma option, just using default zlib mode."
+         SQUASHFS_OPTIONS="$(echo $SQUASHFS_OPTIONS | sed 's/-nolzma//g')"
+         eend 0
+      fi
+   fi
+
+   if echo "$SQUASHFS_OPTIONS" | grep -q -- "-lzma" ; then
+      if ! mksquashfs --help 2>&1 | grep -q -- '-lzma' ; then
+         ewarn "mksquashfs does NOT support the lzma option, falling back to zlib mode."
+         SQUASHFS_OPTIONS="$(echo $SQUASHFS_OPTIONS | sed 's/-lzma//g')"
+         eend 0
+      fi
    fi
 
    SQUASHFS_OUTPUT="$(mktemp -t grml-live.XXXXXX)"