\"" $1; then
reason="malloc.h"; tag="malloc.h"
elif grep -q "core dumped" $1; then
reason="coredump"; tag="coredump"
elif grep -q "Segmentation fault" $1; then
reason="segfault"; tag="segfault"
elif egrep -q "storage size of.*isn't known" $1; then
reason="union_wait"; tag="wait"
elif grep -q "initializer element is not constant" $1; then
reason="stdio"; tag="stdio"
elif grep -q "structure has no member named" $1; then
reason="struct_changes"; tag="struct"
else
reason="???"; tag="unknown"
fi
broken="no"
if grep -q "Trying build of .* even though it is marked BROKEN" $1; then
broken="broken"
fi
shift
echo "$filename|$portname|$affected|$logsize|$dir|$maintainer|$reason|$tag|$broken|$datetime" >> .logs
done
fi
# XXX Sometimes log entries get doubled up for some reason
uniq .logs > .logs2
mv .logs2 .logs
num=$(wc -l < .logs)
header() {
echo "Package building errors" >$of
echo "Package building errors
" >>$of
echo "View by " >>$of
echo "[ port " >>$of
echo "| maintainer " >>$of
echo "| category " >>$of
echo "| error " >>$of
echo "| builddate " >>$of
echo "]
" >>$of
if [ $num = "0" ]; then
echo "No errors (yet)" >>$of
else
if [ -s cvsdone ]; then
echo "CVS update finished at: $(cat cvsdone)
" >> $of
fi
echo "Timestamp of newest log: $(ls -rtTl *.log | tail -1 | awk '{printf("%s %s %s %s\n",$6,$7,$8,$9)}')
" >> $of
echo "\"Aff.\" is number of ports that depend on this one
" >> $of
echo "\"[B]\" indicates port is marked BROKEN
" >> $of
echo "$num errors
" >> $of
echo "" >>$of
echo "$1
" >>$of
fi
}
#
# Create "default" output, sorted on portname
#
header "Port | Aff. | Size | CVS | Maintainer | Reason | Date build | "
for i in `cat .logs | sort`; do
set $(echo $i | tr \| " ")
echo "" >> $of
echo "$2 | " >> $of
affby=$3
test $affby = "0" && affby=""
echo "$affby | $4 Kb | " >> $of
echo "$5 | " >> $of
echo "$6 | " >> $of
echo "" >> $of
test "$9" = "broken" && echo "[B]" >> $of
reason=$(echo $7 | tr '_' ' ')
echo "$reason" >> $of
echo " | " >> $of
date=$(echo ${10} | tr '_' ' ')
echo "$date | " >> $of
echo "
" >> $of
done
echo "
" >> $of
mv -f $of index.html
#
# Create output by category
#
header "CVS | Aff. | Size | Port | Maintainer | Reason | Date build | "
for i in `cat .logs | sort -t \\| +4`; do
set $(echo $i | tr \| " ")
echo "" >> $of
echo "$5 | " >> $of
affby=$3
test $affby = "0" && affby=""
echo "$affby | $4 Kb | " >> $of
echo "$2 | " >> $of
echo "$6 | " >> $of
echo "" >> $of
test "$9" = "broken" && echo "[B]" >> $of
reason=$(echo $7 | tr '_' ' ')
echo "$reason" >> $of
echo " | " >> $of
date=$(echo ${10} | tr '_' ' ')
echo "$date | " >> $of
echo "
" >> $of
done
echo "" >> $of
mv -f $of index-category.html
#
# Create output by maintainer
#
header "Maintainer | Port | Aff. | Size | CVS | Reason | Date build | "
for i in `cat .logs | sort -t \\| +5`; do
set $(echo $i | tr \| " ")
echo "" >> $of
echo "$6 | " >> $of
echo "$2 | " >> $of
affby=$3
test $affby = "0" && affby=""
echo "$affby | $4 Kb | " >> $of
echo "$5 | " >> $of
echo "" >> $of
test "$9" = "broken" && echo "[B]" >> $of
reason=$(echo $7 | tr '_' ' ')
echo "$reason" >> $of
echo " | " >> $of
date=$(echo ${10} | tr '_' ' ')
echo "$date | " >> $of
echo "
" >> $of
done
echo "" >> $of
mv -f $of index-maintainer.html
#
# Create output by error
#
header "Reason | Port | Aff. | Size | CVS | Maintainer | Date build | "
for i in `cat .logs | sort -t \\| +7`; do
set $(echo $i | tr \| " ")
echo "" >> $of
echo "" >> $of
test "$9" = "broken" && echo "[B]" >> $of
reason=$(echo $7 | tr '_' ' ')
echo "$reason" >> $of
echo " | " >> $of
echo "$2 | " >> $of
affby=$3
test $affby = "0" && affby=""
echo "$affby | $4 Kb | " >> $of
echo "$5 | " >> $of
echo "$6 | " >> $of
date=$(echo ${10} | tr '_' ' ')
echo "$date | " >> $of
echo "
" >> $of
done
echo "" >> $of
mv -f $of index-reason.html
#
# Create output by builddate
#
header "Date build | Port | Aff. | Size | CVS | Maintainer | Reason | "
for i in `cat .logs | sort -t \\| +9`; do
set $(echo $i | tr \| " ")
echo "" >> $of
date=$(echo ${10} | tr '_' ' ')
echo "$date | " >> $of
echo "$2 | " >> $of
affby=$3
test $affby = "0" && affby=""
echo "$affby | $4 Kb | " >> $of
echo "$5 | " >> $of
echo "$6 | " >> $of
echo "" >> $of
test "$9" = "broken" && echo "[B]" >> $of
reason=$(echo $7 | tr '_' ' ')
echo "$reason" >> $of
echo " | " >> $of
echo "
" >> $of
done
echo "" >> $of
mv -f $of index-builddate.html
#
# Get list of maintainers.
#
for i in `cat .logs | sort -t \\| +9`; do
set $(echo $i | tr \| " ")
maints="$maints $6"
done
echo $maints | sed -e 's/ /\
/g' | sort -fu > maintainers
rm .lock