cookutils rev 613 3.1.6

cook: triggers ^ERROR, not ERROR
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 24 13:45:43 2013 +0000 (2013-09-24)
parents 01a770611a98
children 33a04f14532c
files cook
line diff
     1.1 --- a/cook	Tue Sep 24 09:14:14 2013 +0000
     1.2 +++ b/cook	Tue Sep 24 13:45:43 2013 +0000
     1.3 @@ -348,10 +348,10 @@
     1.4  	# L10n: Please, translate all messages beginning with ERROR in a same way
     1.5  	lerror=$(_n "ERROR")
     1.6  	for error in \
     1.7 -		ERROR $lerror "No package" "cp: can't" "can't open" "can't cd" \
     1.8 +		^ERROR ^$lerror "No package" "cp: can't" "can't open" "can't cd" \
     1.9  		"error:" "fatal error:" "undefined reference to" \
    1.10  		"Unable to connect to" "link: cannot find the library" \
    1.11 -		"CMake Error"
    1.12 +		"CMake Error" "No such file or directory"
    1.13  	do
    1.14  		fgrep "$error" $LOGS/$pkg.log
    1.15  	done
    1.16 @@ -607,7 +607,7 @@
    1.17  	# is enabled and cook fails we have ERROR in log, if no auto cook we have
    1.18  	# missing dep in cached file.
    1.19  	lerror=$(_n "ERROR")
    1.20 -	if fgrep -q $lerror $LOGS/$pkg.log || [ -s "$CACHE/missing.dep" ]; then
    1.21 +	if fgrep -q ^$lerror $LOGS/$pkg.log || [ -s "$CACHE/missing.dep" ]; then
    1.22  		[ -s "$CACHE/missing.dep" ] && nb=$(cat $CACHE/missing.dep | wc -l)
    1.23  		_ "ERROR: missing dep \$nb" && exit 1
    1.24  	fi
    1.25 @@ -704,7 +704,7 @@
    1.26  	fi
    1.27  	# ERROR can be echoed any time in cookit()
    1.28  	lerror=$(_n "ERROR")
    1.29 -	if grep -Eq "($lerror|undefined reference to)" $LOGS/$pkg.log; then
    1.30 +	if grep -Eq "(^$lerror|undefined reference to)" $LOGS/$pkg.log; then
    1.31  		debug_info | tee -a $LOGS/$pkg.log
    1.32  		rm -f $command && exit 1
    1.33  	fi
    1.34 @@ -734,7 +734,7 @@
    1.35  
    1.36  	# First QA check to stop now if genpkg_rules failed.
    1.37  	lerror=$(_n "ERROR")
    1.38 -	if fgrep -q $lerror $LOGS/$pkg.log; then
    1.39 +	if fgrep -q ^$lerror $LOGS/$pkg.log; then
    1.40  		exit 1
    1.41  	fi
    1.42  
    1.43 @@ -820,7 +820,7 @@
    1.44  
    1.45  	# Exit if any error found in log file.
    1.46  	lerror=$(_n "ERROR")
    1.47 -	if fgrep -q $lerror $LOGS/$pkg.log; then
    1.48 +	if fgrep -q ^$lerror $LOGS/$pkg.log; then
    1.49  		rm -f $command && exit 1
    1.50  	fi
    1.51