Commit c72c3e6e authored by Vitaly Lipatov's avatar Vitaly Lipatov

fix check_log: enable log verification again

parent 92493c00
#!/bin/bash #!/bin/bash
# 2008, 2011 Etersoft www.etersoft.ru # 2008, 2011, 2013 Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru> # Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain # Public domain
__check_string()
{
local LOGFILE="$1"
shift
local NC="$@"
grep -- "$NC" $LOGFILE && warning "'$NC' problem exists in the build output"
}
check_log() check_log()
{ {
local LOGFILE i RES local LOGFILE i RES
echo echo
echo "-------------------------------------------------------" echo "-------------------------------------------------------"
echog "Check log for..."
LOGFILE=$1 LOGFILE=$1
echog "Check log $LOGFILE for..."
# obsoleted
if grep -q 'ld: warning: libstdc++\.so\.5, needed by [^ ]\+, may conflict with libstdc++\.so\.6' $LOGFILE ; then if grep -q 'ld: warning: libstdc++\.so\.5, needed by [^ ]\+, may conflict with libstdc++\.so\.6' $LOGFILE ; then
echog "Error found: libstdc++.so.5/6 conflicts. Check the log." echog "Error found: libstdc++.so.5/6 conflicts. Check the log."
return 1 return 1
...@@ -21,18 +30,14 @@ check_log() ...@@ -21,18 +30,14 @@ check_log()
echog "Error found: will always overflow destination buffer. Check the log." echog "Error found: will always overflow destination buffer. Check the log."
return 1 return 1
fi fi
#grep "WARNING:" $LOGFILE
grep 'python-strict' $LOGFILE && warning "python-strict used!!!" local i
NC1="command not found" for i in "python-strict" \
NC2="-march=athlon -mtune=athlon-xp" "command not found" \
NC3="WARNING:" "-march=athlon -mtune=athlon-xp" \
#for i in ${NC1} ; do "WARNING:"; do
grep -- '$NC1' $LOGFILE && warning "'$NC1' in build output (some errors in a scripts)" __check_string $LOGFILE "$i"
grep -- '$NC2' $LOGFILE && warning "'$NC2' in build output (forbidden) " done
grep -- '$NC3' $LOGFILE && warning "'$NC3' in build output (forbidden) "
#done
return 0 return 0
} }
#!/bin/sh
# Run with rpm build log for test
. `dirname $0`/../share/eterbuild/functions/common
load_mod check
check_log $1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment