cookutils rev 565

cook: track more errors
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 05 18:34:59 2013 +0100 (2013-01-05)
parents 1bd258f7838a
children 0b66cd1ea4e8
files cook
line diff
     1.1 --- a/cook	Mon Dec 31 17:03:55 2012 +0100
     1.2 +++ b/cook	Sat Jan 05 18:34:59 2013 +0100
     1.3 @@ -654,7 +654,7 @@
     1.4  		echo -e "ERROR: cook failed" | tee -a $LOGS/$pkg.log
     1.5  	fi
     1.6  	# ERROR can be echoed any time in cookit()
     1.7 -	if fgrep -q ERROR: $LOGS/$pkg.log; then
     1.8 +	if grep -eq '(ERROR:|make: ***|undefined reference to)' $LOGS/$pkg.log; then
     1.9  		debug_info | tee -a $LOGS/$pkg.log
    1.10  		rm -f $command && exit 1
    1.11  	fi
    1.12 @@ -1348,7 +1348,7 @@
    1.13  		clean_log
    1.14  
    1.15  		# Exit if any error in packing.
    1.16 -		if grep -q ^ERROR $LOGS/$pkg.log; then
    1.17 +		if grep -Eq '(^ERROR|No such file or directory)' $LOGS/$pkg.log; then
    1.18  			debug_info | tee -a $LOGS/$pkg.log
    1.19  			rm -f $command && exit 1
    1.20  		fi