From 613cff9828f6d775a269334ec8588217caa03af8 Mon Sep 17 00:00:00 2001 From: Satoshi Asami Date: Tue, 22 Jun 1999 10:11:00 +0000 Subject: Three scripts to look into the error logs and generate the now-famous web page of errors. --- Tools/portbuild/scripts/comparelogs | 51 +++++++++++++++++++ Tools/portbuild/scripts/dologs | 10 ++++ Tools/portbuild/scripts/processlogs | 98 +++++++++++++++++++++++++++++++++++++ 3 files changed, 159 insertions(+) create mode 100755 Tools/portbuild/scripts/comparelogs create mode 100755 Tools/portbuild/scripts/dologs create mode 100755 Tools/portbuild/scripts/processlogs (limited to 'Tools') diff --git a/Tools/portbuild/scripts/comparelogs b/Tools/portbuild/scripts/comparelogs new file mode 100755 index 000000000000..a5952287b077 --- /dev/null +++ b/Tools/portbuild/scripts/comparelogs @@ -0,0 +1,51 @@ +#!/bin/sh + +# prints out logs that are in dir1 but not in dir2 + +if [ $# != 2 ]; then + echo "usage: $0 dir1 dir2" + exit 1 +fi + +here=$(pwd) +dir1=$1 +dir2=$2 +fdir1=$here/$dir1 +fdir2=$here/$dir2 +ldir2=$(cd $fdir2; cd ../logs; pwd) + +of=$here/$dir1-$dir2.html + +echo "Logs that are in $dir1 but not in $dir2" >$of +echo "

Logs that are in $dir1 but not in $dir2

" >>$of +echo "" >>$of + +cd $fdir1 + +set *.log + +if [ $# = 1 -a "x$1" = "x*.log" ]; then + echo "No errors" >>$of +else + num=0 + echo "" >>$of + echo "" >>$of + while [ $# -gt 0 ]; do + if [ -f ${ldir2}/$1 -a ! -f ${fdir2}/$1 ]; then + echo -n "" >>$of + num=$(($num + 1)) + fi + shift + done + echo "
Log
" >>$of + echo -n "" >>$of + echo -n $(basename $1 .log) >>$of + echo -n "" >>$of + echo "

" >> $of + echo "$num errors
" >> $of +fi + +echo "
" >> $of +echo "back to top" >> $of + +echo "" >>$of diff --git a/Tools/portbuild/scripts/dologs b/Tools/portbuild/scripts/dologs new file mode 100755 index 000000000000..3015d4d42163 --- /dev/null +++ b/Tools/portbuild/scripts/dologs @@ -0,0 +1,10 @@ +#!/bin/sh +home=/a/asami/portbuild/errorlogs +scripts=/a/asami/portbuild/scripts +dir1=3-latest +dir2=4-latest + +cd $home/$dir1 && ${scripts}/processlogs +cd $home/$dir2 && ${scripts}/processlogs +cd $home && ${scripts}/comparelogs $dir1 $dir2 +cd $home && ${scripts}/comparelogs $dir2 $dir1 diff --git a/Tools/portbuild/scripts/processlogs b/Tools/portbuild/scripts/processlogs new file mode 100755 index 000000000000..274d55ebf37c --- /dev/null +++ b/Tools/portbuild/scripts/processlogs @@ -0,0 +1,98 @@ +#!/bin/sh + +of=index.html.new + +echo "Package building errors" >$of +echo "

Package building errors

" >>$of +echo "" >>$of + +set *.log + +if [ $# = 1 -a "x$1" = "x*.log" ]; then + echo "No errors (yet)" >>$of +else + num=$# + echo "(timestamp of newest log: $(ls -rtTl *.log | tail -1 | awk '{printf("%s %s %s %s\n",$6,$7,$8,$9)}'))

" >> $of + echo "" >>$of + echo "" >>$of + while [ $# -gt 0 ]; do + echo -n "" >>$of + shift + done + echo "
LogSizeRepositoryMaintainerReason
" >>$of + echo -n "" >> $of + echo -n "" >>$of + echo -n $(basename $1 .log) >>$of + echo -n "" >>$of + echo -n "" >>$of + size=$(/bin/ls -sk $1 | awk '{print $1}') + echo -n "$size KB" >>$of + echo -n "" >>$of + dir=$(sed -n -e '3p' $1 | awk '{print $4}' | sed -e 's,^/[^/]*/[^/]*/,,') + echo -n "$dir" >>$of + echo -n "" >>$of + maint=$(sed -n -e '4p' $1 | awk '{print $3}') + maints="$maints $maint" + echo -n "$maint" >>$of + echo -n "" >>$of + if grep -q 'Checksum mismatch' $1; then + reason="checksum"; tag="checksum" + elif grep -q 'No checksum recorded for' $1; then + reason="files/md5 update"; tag="md5" + elif grep -qE '(configure: error:|script.*failed: here are the contents of)' $1; then + reason="configure error"; tag="configure" + elif grep -q "Couldn't fetch it - please try" $1; then + reason="fetch"; tag="fetch" + elif grep -q "out of .* hunks .*--saving rejects to" $1; then + reason="patch"; tag="patch" + elif grep -q 'undefined reference to `Xp' $1; then + reason="MOTIFLIB"; tag="motiflib" + elif grep -qi 'read-only file system' $1; then + reason="WRKDIR"; tag="wrkdir" + elif grep -q 'makeinfo: .* use --force' $1; then + reason="texinfo"; tag="texinfo" + elif grep -q 'means that you did not run the h2ph script' $1; then + reason="perl5"; tag="perl5" + elif grep -q "Error: shared library \".*\" does not exist" $1; then + reason="LIB_DEPENDS"; tag="libdepends" + elif grep -q ".*\.h: No such file" $1; then + if grep -q "X11/.*\.h: No such file" $1; then + if grep -q "XFree86-.*\.tgz" $1; then + reason="missing header"; tag="header" + else + reason="USE_XLIB"; tag="usexlib" + fi + else + reason="missing header"; tag="header" + fi + elif grep -q "cd: can't cd to" $1; then + reason="NFS"; tag="nfs" + elif grep -qE '(parse error|too (many|few) arguments to|argument.*doesn.*prototype)' $1; then + reason="compiler error"; tag="cc" + elif grep -qE '(undefined reference to|cannot open -l.*: No such file)' $1; then + reason="linker error"; tag="ld" + elif grep -q 'install: .*: No such file' $1; then + reason="install error"; tag="install" + elif grep -q "/usr/.*/man/.*: No such file or directory" $1; then + reason="manpage"; tag="manpage" + elif grep -q "tar: can't add file" $1; then + reason="PLIST"; tag="plist" + elif grep -q "Can't open display" $1; then + reason="DISPLAY"; tag="display" + else + reason="???"; tag="unknown" + fi + echo -n "$reason" >>$of + echo "

" >> $of + echo "$num errors
" >> $of +fi + +echo "
" >> $of +echo "back to top" >> $of + +echo "" >>$of + +mv -f $of index.html + +echo $maints | sed -e 's/ /\ +/g' | sort -fu > maintainers -- cgit v1.2.3