# HG changeset patch # User Pascal Bellard # Date 1380030343 0 # Node ID 14aa9f6204323607dd7c5f16fb57a354781afdc5 # Parent 01a770611a982058846cc9f3f622e12becb284ae cook: triggers ^ERROR, not ERROR diff -r 01a770611a98 -r 14aa9f620432 cook --- a/cook Tue Sep 24 09:14:14 2013 +0000 +++ b/cook Tue Sep 24 13:45:43 2013 +0000 @@ -348,10 +348,10 @@ # L10n: Please, translate all messages beginning with ERROR in a same way lerror=$(_n "ERROR") for error in \ - ERROR $lerror "No package" "cp: can't" "can't open" "can't cd" \ + ^ERROR ^$lerror "No package" "cp: can't" "can't open" "can't cd" \ "error:" "fatal error:" "undefined reference to" \ "Unable to connect to" "link: cannot find the library" \ - "CMake Error" + "CMake Error" "No such file or directory" do fgrep "$error" $LOGS/$pkg.log done @@ -607,7 +607,7 @@ # is enabled and cook fails we have ERROR in log, if no auto cook we have # missing dep in cached file. lerror=$(_n "ERROR") - if fgrep -q $lerror $LOGS/$pkg.log || [ -s "$CACHE/missing.dep" ]; then + if fgrep -q ^$lerror $LOGS/$pkg.log || [ -s "$CACHE/missing.dep" ]; then [ -s "$CACHE/missing.dep" ] && nb=$(cat $CACHE/missing.dep | wc -l) _ "ERROR: missing dep \$nb" && exit 1 fi @@ -704,7 +704,7 @@ fi # ERROR can be echoed any time in cookit() lerror=$(_n "ERROR") - if grep -Eq "($lerror|undefined reference to)" $LOGS/$pkg.log; then + if grep -Eq "(^$lerror|undefined reference to)" $LOGS/$pkg.log; then debug_info | tee -a $LOGS/$pkg.log rm -f $command && exit 1 fi @@ -734,7 +734,7 @@ # First QA check to stop now if genpkg_rules failed. lerror=$(_n "ERROR") - if fgrep -q $lerror $LOGS/$pkg.log; then + if fgrep -q ^$lerror $LOGS/$pkg.log; then exit 1 fi @@ -820,7 +820,7 @@ # Exit if any error found in log file. lerror=$(_n "ERROR") - if fgrep -q $lerror $LOGS/$pkg.log; then + if fgrep -q ^$lerror $LOGS/$pkg.log; then rm -f $command && exit 1 fi