cookutils diff cook @ rev 969

cook: allow empty packages.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Sep 18 20:08:03 2017 +0300 (2017-09-18)
parents 570634fb2c05
children 16d5ef60f3d6
line diff
     1.1 --- a/cook	Mon Sep 04 02:18:51 2017 +0300
     1.2 +++ b/cook	Mon Sep 18 20:08:03 2017 +0300
     1.3 @@ -1006,7 +1006,8 @@
     1.4  	# Build cpio archive.
     1.5  	action 'Compressing the FS...'
     1.6  	find fs -newer $receipt -exec touch -hr $receipt '{}' \;
     1.7 -	find fs | cpio -o -H newc --quiet | lzma e fs.cpio.lzma -si
     1.8 +	find fs | cpio -o -H newc --quiet | lzma-alone e fs.cpio.lzma -si
     1.9 +#	find fs | cpio -o -H newc --quiet | /bin/lzma -zeT0 -vv >fs.cpio.lzma
    1.10  	mv fs ../
    1.11  	status
    1.12  
    1.13 @@ -1032,9 +1033,9 @@
    1.14  	find . | cpio -o -H newc --quiet > ../$PACKAGE-$VERSION$EXTRAVERSION$arch.tazpkg
    1.15  	status
    1.16  
    1.17 -	action 'Restoring original package tree...'
    1.18 +#	action 'Restoring original package tree...'
    1.19  	mv ../fs .
    1.20 -	status
    1.21 +#	status
    1.22  
    1.23  	rm fs.cpio.lzma; cd ..
    1.24  
    1.25 @@ -1081,21 +1082,25 @@
    1.26  	#[ "$link" ] && echo -e "\nERROR: broken link in filesystem"
    1.27  	#status
    1.28  
    1.29 -	# Exit if any error found in log file.
    1.30 -	lerror=$(_n 'ERROR')
    1.31 -	if fgrep -q ^$lerror $LOGS/$pkg.log; then
    1.32 -		rm -f $command
    1.33 -		broken; exit 1
    1.34 +	if [ "${COOKOPTS/skip-log-errors/}" == "$COOKOPTS" ]; then
    1.35 +		# Exit if any error found in log file.
    1.36 +		if fgrep -q ^ERROR $LOGS/$pkg.log; then
    1.37 +			rm -f $command
    1.38 +			broken; exit 1
    1.39 +		fi
    1.40  	fi
    1.41  
    1.42 -	action 'QA: checking for empty package...'
    1.43 -	if [ ! -s "$pack/files.list" -a "$CATEGORY" != 'meta' ]; then
    1.44 -		broken
    1.45 -		rm -f $command
    1.46 -		die 'ERROR: empty package'
    1.47 +	if [ "${COOKOPTS/empty-pkg/}" == "$COOKOPTS" ]; then
    1.48 +		action 'QA: checking for empty package...'
    1.49 +		if [ ! -s "$pack/files.list" -a "$CATEGORY" != 'meta' ]; then
    1.50 +			broken
    1.51 +			rm -f $command
    1.52 +			false; status
    1.53 +			die 'ERROR: empty package'
    1.54 +		fi
    1.55 +		:; status
    1.56  	fi
    1.57  
    1.58 -	:; status
    1.59  
    1.60  	# Find and remove old package(s) only if "release checksum" has changed
    1.61  	rsum=$(release_checksum $pack)