wok-stable rev 4850

tazbb: add new tazpkg format (lzma)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jan 31 22:25:15 2010 +0100 (2010-01-31)
parents 9f229c23e1ba
children 92ec79fce82b
files tazbb/stuff/tazbb
line diff
     1.1 --- a/tazbb/stuff/tazbb	Sun Jan 31 22:16:23 2010 +0100
     1.2 +++ b/tazbb/stuff/tazbb	Sun Jan 31 22:25:15 2010 +0100
     1.3 @@ -518,8 +518,8 @@
     1.4  			. ./receipt
     1.5  			if [ "$CATEGORY" != "meta" ]; then
     1.6  				[ "$2" = "--verbose" ] && echo "Testing: $PACKAGE"
     1.7 -				cpio -i fs.cpio.gz >/dev/null 2>&1 < $pkg
     1.8 -				if [ ! -f fs.cpio.gz ]; then
     1.9 +				cpio -i fs.cpio.gz fs.cpio.lzma >/dev/null 2>&1 < $pkg
    1.10 +				if [ ! -f fs.cpio.gz -a ! -f fs.cpio.lzma ]; then
    1.11  					echo "Missing filesystem    `basename $pkg`"
    1.12  					if [ -f $LOG_DIR/$PACKAGE.log ];then
    1.13  						echo "Missing filesystem    `basename $pkg` <a href=\"log.php?package=$(escape $PACKAGE)\">Log</a>" \
    1.14 @@ -529,7 +529,9 @@
    1.15  							>> $DB_DIR/corrupted
    1.16  					fi
    1.17  				else
    1.18 -					zcat fs.cpio.gz | cpio -id >/dev/null 2>&1
    1.19 +					( zcat fs.cpio.gz 2> /dev/null || \
    1.20 +					  unlzma -c fs.cpio.lzma ) | \
    1.21 +					cpio -id >/dev/null 2>&1
    1.22  					files=`find fs -type f -o -type l`
    1.23  					if [ -z "$files" ]; then
    1.24  						echo "Empty filesystem      `basename $pkg`"