aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-01-20 06:30:53 +0800
committermarcus <marcus@FreeBSD.org>2004-01-20 06:30:53 +0800
commit4b864d69e4586d7eb0f29d0c511cf77508ced31d (patch)
tree6cd9dd893143108bb6154173a4a466cfd11ad4f2
parent1f9546c46ffeaa77a8dcafb19364fa9dbe97b82e (diff)
downloadfreebsd-ports-gnome-4b864d69e4586d7eb0f29d0c511cf77508ced31d.tar.gz
freebsd-ports-gnome-4b864d69e4586d7eb0f29d0c511cf77508ced31d.tar.zst
freebsd-ports-gnome-4b864d69e4586d7eb0f29d0c511cf77508ced31d.zip
* Refactor processlogs so that new error types can be added easily to a new
processonelog script, that contains all the per-errorlog logic [1] * Add new error checks, one for detecting CPU problems, and the other for checking for broken libgnugetopt support [2] * Add a new "munmap" error type to check for broken bindists * Add imake and pthread detection to processonelog [3] * Add errortype column to the bento "New Build Failures" report [4] PR: 50258 56859 [1] 54406 [2] 57067 [3] 59272 [4] Submitted by: linimon [1] [2] [3] [4]
-rwxr-xr-xTools/portbuild/scripts/processfail15
-rwxr-xr-xTools/portbuild/scripts/processlogs402
-rwxr-xr-xTools/portbuild/scripts/processonelog336
3 files changed, 441 insertions, 312 deletions
diff --git a/Tools/portbuild/scripts/processfail b/Tools/portbuild/scripts/processfail
index a68f9c839df9..1f97479d2689 100755
--- a/Tools/portbuild/scripts/processfail
+++ b/Tools/portbuild/scripts/processfail
@@ -5,6 +5,9 @@
arch=$1
branch=$2
+scriptdir=$(dirname $0)
+errorscript=${scriptdir}/processonelog
+
pb=/var/portbuild
of=/usr/local/www/data/errorlogs/.${arch}-${branch}-failure.html
@@ -41,10 +44,16 @@ footer() {
echo "</html>" >>$of
}
+geterrortype() {
+ set $(echo `${errorscript} $logfile ./ports` | tr \| " ")
+ reason=$(echo $7 | tr '_' ' ')
+ echo "<a href=\"http://bento.freebsd.org/#$8\">$reason</a>"
+}
+
#
# Create "default" output, sorted on portname
#
-header "<th>Port</th><th>Package</th><th>Broken</th><th>Last</th><th>#</th>"
+header "<th>Port</th><th>Package</th><th>Error</th><th>Broken</th><th>Last</th><th>#</th>"
sort -r -n -k 4 -t \| failure > newfailure
IFS='|'
@@ -58,6 +67,10 @@ while read dir name ver date last count; do
# echo "<td><a href=\"mailto:$6\">$6</a></td>" >> $of
# echo "<td>" >> $of
+ logfile=${ver}.log
+ errortype=`geterrortype`
+ echo "<td>$errortype</td>" >> $of
+
alphadate=$(date -jf %s ${date} "+%F %T")
alphalast=$(date -jf %s ${last} "+%F %T")
echo "<td>${alphadate}</td>" >> $of
diff --git a/Tools/portbuild/scripts/processlogs b/Tools/portbuild/scripts/processlogs
index 37ac424f19fe..c4397f37eeb6 100755
--- a/Tools/portbuild/scripts/processlogs
+++ b/Tools/portbuild/scripts/processlogs
@@ -1,324 +1,57 @@
#!/bin/sh
+# echo 'processlogs: at '`date`', begin'
+# establish which directory the logfiles live in (leave out for
+# backwards compatibility)
+buildlogdir=$(realpath .)
+if [ "$2" != "" ]; then buildlogdir="$2"; fi
+
+# establish which directory INDEX lives in (leave out for
+# backwards compatibility)
+indexlogdir=$(realpath .)
+if [ "$3" != "" ]; then indexlogdir="$3"; fi
+
+# allow this script to be run from anywhere in the tree
+scriptdir=$(dirname $0)
+errorscript=$scriptdir/processonelog
+
+# create a name for the tempfile
of=.index.html
-# delete .new file if it is more than a day old
+# delete lockfiles if more than a day old
find $of .lock -mmin +60 -delete 2>/dev/null
+# exit if another instance of this program is running
if [ -f $of -o -f .lock ]; then exit; fi
-if [ -e .stamp -a $(echo $(find . -maxdepth 1 -newer .stamp -type f -name '*.log' 2>/dev/null | wc -l)) = "0" ]; then exit; fi
+# if there are no new logfiles, there is nothing to do here.
+if [ -e .stamp -a $(echo $(find -f $buildlogdir -maxdepth 1 -newer .stamp -type f -name '*.log' 2>/dev/null | wc -l)) = "0" ]; then exit; fi
touch .stamp
touch .lock
-set *.log
+# get the list of buildlogs.
+set $buildlogdir/*.log
> .logs
#
-# Read the log-files and write it to .logs in the format
-# $filename|$portname|$affected|$logsize|$dir|$maintainer|\
-# $reason|$tag|$broken|$datetime
-#
+# Read the log-files and write summaries to .logs in the format
+# $filename|$portname|$affected|$logsize|$dir|$maintainer|\
+# $reason|$tag|$broken|$datetime
#
-if [ $# != 1 -o "x$1" != "x*.log" ]; then
- while [ ! -z "$1" ]; do
- filename=$1
-
- portname=$(basename $filename .log)
- affected=$(($(grep -cF $portname < INDEX) -1))
- logsize=$(/bin/ls -sk $filename | awk '{print $1}')
- dir=$(sed -n -e '3p' $filename | awk '{print $4}' | \
- sed -e 's,^/[^/]*/[^/]*/,,')
- maintainer=$(sed -n -e '4p' $filename | awk '{print $3}')
- datetime=$(grep 'build started at' $filename | \
- sed -e 's/build started at ...//' | tr ' ' '_' )
-
- # throw out totally bogus files (e.g., blank file, error 404, etc.)
- if [ -z "$dir" -a -z "$maintainer" -a -z "$datetime" ]; then
- shift
- continue
- fi
+# echo 'processlogs: at '`date`', begin processing log files'
- if grep -q 'list of extra files and directories' $1; then
- reason="mtree"; tag="mtree"
- elif grep -q "See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions." $1; then
- reason="gcc_bug"; tag="gcc-bug"
- elif grep -q 'Checksum mismatch' $1; then
- reason="checksum"; tag="checksum"
- elif grep -qE '/usr/local/bin/(perl|perl5.6.1):.*(not found|No such file or directory)' $1; then
- reason="perl"; tag="perl"
- elif grep -qE 'perl(.*): Perl is not installed, try .pkg_add -r perl.' $1; then
- reason="perl"; tag="perl"
- elif grep -q 'cannot find -lc_r' $1; then
- reason="threads"; tag="threads"
- elif grep -q "checking for.*lc_r\.\.\. no" $1; then
- reason="threads"; tag="threads"
- elif grep -qE '(No checksum recorded for|(Maybe|Either) .* is out of date, or)' $1; then
- reason="distinfo_update"; tag="distinfo"
- elif grep -q "checking whether apxs works.*apxs: not found" $1; then
- reason="apxs"; tag="apxs"
- elif grep -qE '(configure: error:|script.*failed: here are the contents of)' $1; then
- if grep -qE "configure: error: (This program requires STL to compile|One or more.*STL headers are missing)" $1; then
- reason="stl"; tag="stl"
- elif grep -qE "configure: error: [Pp]erl (5.* required|version too old)" $1; then
- reason="perl"; tag="perl"
- else
- reason="configure_error"; tag="configure"
- fi
- elif grep -qE '(bison:.*(No such file|not found)|multiple definition of `yy)' $1; then
- reason="bison"; tag="bison"
- 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 'Error: category .* not in list of valid categories' $1; then
- reason="CATEGORIES"; tag="categories"
- elif grep -q 'make: don.t know how to make .*\.man. Stop' $1; then
- reason="X_manpage"; tag="xfree4man"
- elif grep -q 'Xm/Xm\.h: No such file' $1; then
- reason="MOTIF"; tag="motif"
- 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 -qE "(crt0|c\+\+rt0)\.o: No such file" $1; then
- reason="ELF"; tag="elf"
- elif grep -q "machine/soundcard.h: No such file or directory" $1; then
- reason="soundcard.h"; tag="soundcard.h"
- elif grep -q "values.h: No such file or directory" $1; then
- reason="values.h"; tag="values.h"
- elif grep -q ".*\.h: No such file" $1; then
- if grep -qE "(X11/.*|Xosdefs)\.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 "pnohang: killing make checksum" $1; then
- reason="fetch_timeout"; tag="fetch-timeout"
- elif grep -q "USER PID PPID PGID JOBC STAT TT TIME COMMAND" $1; then
- reason="runaway_process"; tag="runaway"
- elif grep -q "pnohang: killing make package" $1; then
- reason="runaway_process"; tag="runaway"
- elif grep -q "cd: can't cd to" $1; then
- reason="NFS"; tag="nfs"
- elif grep -qE "pkg_add: (can't find enough temporary space|projected size of .* exceeds available free space)" $1; then
- reason="disk_full"; tag="df"
- elif grep -qE '(parse error|too (many|few) arguments to|argument.*doesn.*prototype|incompatible type for argument|conflicting types for|undeclared \(first use (in |)this function\)|incorrect number of parameters|has incomplete type and cannot be initialized)' $1; then
- reason="compiler_error"; tag="cc"
- elif grep -qE '(ANSI C.. forbids|is a contravariance violation|changed for new ANSI .for. scoping|[0-9]: passing .* changes signedness|discards qualifiers|lacks a cast|redeclared as different kind of symbol|invalid type .* for default argument to|wrong type argument to unary exclamation mark|duplicate explicit instantiation of|incompatible types in assignment|assuming . on overloaded member function|call of overloaded .* is ambiguous|declaration of C function .* conflicts with|initialization of non-const reference type|using typedef-name .* after|[0-9]: implicit declaration of function|[0-9]: size of array .* is too large|fixed or forbidden register .* for class)' $1; then
- reason="new_compiler_error"; tag="newgcc"
- elif grep -qE '(syntax error before|ISO C++ forbids|friend declaration|no matching function for call to|.main. must return .int.|invalid conversion from|cannot be used as a macro name as it is an operator in C\+\+|is not a member of type|after previous specification in|no class template named|because worst conversion for the former|better than worst conversion|no match for.*operator|no match for call to|undeclared in namespace|is used as a type, but is not)' $1; then
- reason="bad_C++_code"; tag="badc++"
- elif grep -qE '(/usr/libexec/elf/ld: cannot find|undefined reference to|cannot open -l.*: No such file)' $1; then
- reason="linker_error"; tag="ld"
- elif grep -qE 'chown:.*invalid argument' $1; then
- reason="chown"; tag="chown"
- elif grep -q 'install: .*: No such file' $1; then
- if grep -q 'install: /usr/local/www/cgi-bin.*No such file or directory' $1; then
- reason="cgi-bin"; tag="cgi-bin"
- else
- reason="install_error"; tag="install"
- fi
- elif grep -q "/usr/.*/man/.*: No such file or directory" $1; then
- reason="manpage"; tag="manpage"
- elif grep -q "pkg_create: make_dist: tar command failed with code" $1; then
- reason="PLIST"; tag="plist"
- elif grep -qE "(Can't|unable to) open display" $1; then
- reason="DISPLAY"; tag="display"
- elif grep -q " is already installed - perhaps an older version" $1; then
- reason="depend_object"; tag="dependobj"
- elif grep -q "error in dependency .*, exiting" $1; then
- reason="depend_package"; tag="dependpkg"
- elif grep -q "#error \"<malloc.h> has been replaced by <stdlib.h>\"" $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"
- elif grep -q "Error: alignment not a power of 2" $1; then
- reason="alignment"; tag="alignment"
- elif grep -qE "bin.apxs:(.)(not found|No such file or directory)" $1; then
- reason="apxs"; tag="apxs"
- elif grep -qE "failed to exec .*bin/apxs" $1; then
- reason="apxs"; tag="apxs"
- elif grep -q ".s: Assembler messages:" $1; then
- reason="arch"; tag="arch"
- elif grep -qE "Cannot (determine .* target|find the byte order) for this architecture" $1; then
- reason="arch"; tag="arch"
- elif grep -q "cast from pointer to integer of different size" $1; then
- reason="arch"; tag="arch"
- elif grep -qE "^cc1: bad value.*for -mcpu.*switch" $1; then
- reason="arch"; tag="arch"
- elif grep -qE "^cc1: invalid option " $1; then
- reason="arch"; tag="arch"
- elif grep -qE "Configuration .* not supported" $1; then
- reason="arch"; tag="arch"
- elif grep -q "could not read symbols: File in wrong format" $1; then
- reason="arch"; tag="arch"
- elif grep -qE "[Ee]rror: [Uu]nknown opcode" $1; then
- reason="arch"; tag="arch"
- elif grep -qE "error.*Unsupported architecture" $1; then
- reason="arch"; tag="arch"
- elif grep -q "ENDIAN must be defined 0 or 1" $1; then
- reason="arch"; tag="arch"
- elif grep -q "failed to merge target-specific data" $1; then
- reason="arch"; tag="arch"
- elif grep -qE "(file not recognized|failed to set dynamic section sizes): File format not recognized" $1; then
- reason="arch"; tag="arch"
- elif grep -q "impossible register constraint" $1; then
- reason="arch"; tag="arch"
- elif grep -qE "inconsistent operand constraints in an .asm" $1; then
- reason="arch"; tag="arch"
- elif grep -q "invalid lvalue in asm statement" $1; then
- reason="arch"; tag="arch"
- elif grep -qE "is only for.*, and you are running" $1; then
- reason="arch"; tag="arch"
- elif grep -q "not a valid 64 bit base/index expression" $1; then
- reason="arch"; tag="arch"
- elif grep -qE "relocation R_X86_64_32.*can not be used when making a shared object" $1; then
- reason="arch"; tag="arch"
- elif grep -q "relocation truncated to fit: " $1; then
- reason="arch"; tag="arch"
- elif grep -qE "The target cpu, .*, is not currently supported." $1; then
- reason="arch"; tag="arch"
- elif grep -q "This architecture seems to be neither big endian nor little endian" $1; then
- reason="arch"; tag="arch"
- elif grep -q "unknown register name" $1; then
- reason="arch"; tag="arch"
- elif grep -q "Unable to correct byte order" $1; then
- reason="arch"; tag="arch"
- elif grep -q "Unsupported platform, sorry" $1; then
- reason="arch"; tag="arch"
- elif grep -q "won't run on this architecture" $1; then
- reason="arch"; tag="arch"
- elif grep -qE "#error .Cannot compile:" $1; then
- reason="assert"; tag="assert"
- elif grep -qE "autoconf(.*): not found" $1; then
- reason="autoconf"; tag="autoconf"
- elif grep -qE "autoconf(.*): No such file or directory" $1; then
- reason="autoconf"; tag="autoconf"
- elif grep -q "autoheader: not found" $1; then
- reason="autoheader"; tag="autoheader"
- elif grep -qE "automake(.*): not found" $1; then
- reason="automake"; tag="automake"
- elif grep -q "awk: empty regular expression" $1; then
- reason="awk"; tag="awk"
- elif grep -qE "(mv:|mv: rename|cannot open) y.tab.c(.*): No such file or directory" $1; then
- reason="bison"; tag="bison"
- elif grep -q "sorry, cannot determine the header file bison generates" $1; then
- reason="bison"; tag="bison"
- elif grep -q "usage: yacc" $1; then
- reason="bison"; tag="bison"
- elif grep -q "/usr/local/www/cgi-bin does not exist" $1; then
- reason="cgi-bin"; tag="cgi-bin"
- elif grep -qE "chown: .*\..*: Invalid argument" $1; then
- reason="chown"; tag="chown"
- elif grep -q "Cannot stat: " $1; then
- reason="configure_error"; tag="configure"
- elif grep -qE "Script.*configure.*failed unexpectedly" $1; then
- reason="configure_error"; tag="configure"
- elif grep -q "Cannot open /dev/tty for read" $1; then
- reason="DISPLAY"; tag="display"
- elif grep -q "RuntimeError: cannot open display" $1; then
- reason="DISPLAY"; tag="display"
- elif grep -q "You must run this program under the X-Window System" $1; then
- reason="DISPLAY"; tag="display"
- elif grep -q "ld: unrecognised emulation mode: elf_i386" $1; then
- reason="ELF"; tag="elf"
- elif grep -qE "Member name contains .\.\." $1; then
- reason="fetch"; tag="fetch"
- elif grep -q "fetch: transfer timed out" $1; then
- reason="fetch_timeout"; tag="fetch-timeout"
- elif grep -q "fetch: transfer timed out" $1; then
- reason="fetch_timeout"; tag="fetch-timeout"
- elif grep -q "strings.h:.* previous declaration of .int ffs" $1; then
- reason="ffs_conflict"; tag="ffs_conflict"
- elif grep -q "is forbidden: FreeBSD-SA-" $1; then
- reason="forbidden"; tag="forbidden"
- elif grep -qE "previous declaration.*int getopt" $1; then
- reason="getopt.h"; tag="getopt.h"
- elif grep -q 'Run-time system build failed for some reason' $1; then
- reason="install_error"; tag="install"
- elif grep -q "/usr/bin/ld: cannot find -lc_r" $1; then
- reason="lc_r"; tag="lc_r"
- elif grep -q "cc: .*libintl.*: No such file or directory" $1; then
- reason="linker_error"; tag="ld"
- elif grep -qE "cc: ndbm\.so: No such file or directory" $1; then
- reason="linker_error"; tag="ld"
- elif grep -q "error: The X11 shared library could not be loaded" $1; then
- reason="linker_error"; tag="ld"
- elif grep -q "relocation against dynamic symbol" $1; then
- reason="linker_error"; tag="ld"
- elif grep -qE "make.*(don.t know how to make|fatal errors encountered|No rule to make target|built-in)" $1; then
- reason="makefile"; tag="makefile"
- elif grep -q "Error: mtree file ./etc/mtree/BSD.local.dist. is missing" $1; then
- reason="mtree"; tag="mtree"
- elif grep -qE "cp:.*site_perl: No such file or directory" $1; then
- reason="perl"; tag="perl"
- elif grep -q "Perl .* required--this is only version" $1; then
- reason="perl"; tag="perl"
- elif grep -q "pod2man: not found" $1; then
- reason="pod2man"; tag="pod2man"
- elif grep -q "Syntax error: .(. unexpected (expecting .fi.)" $1; then
- reason="portcomment"; tag="portcomment"
- elif grep -q "Abort trap" $1; then
- reason="process_failed"; tag="process"
- elif grep -q "Bus error" $1; then
- reason="process_failed"; tag="process"
- elif grep -q "Signal 11" $1; then
- reason="process_failed"; tag="process"
- elif grep -q "USER PID PPID PGID JOBC STAT TT TIME COMMAND" $1; then
- reason="process_failed"; tag="process"
- elif grep -q "python: not found" $1; then
- reason="python"; tag="python"
- elif grep -qE "sed: illegal option" $1; then
- reason="sed"; tag="sed"
- elif grep -qE "sed: [0-9]*:.*(RE error:|not defined in the RE|bad flag in substitute command|unescaped newline inside substitute pattern|invalid command code)" $1; then
- reason="sed"; tag="sed"
- elif grep -q "Your STL string implementation is unusable" $1; then
- reason="stl"; tag="stl"
- elif grep -q "Error: pthreads are required to build this package" $1; then
- reason="threads"; tag="threads"
- elif grep -q "Please install/update your POSIX threads (pthreads) library" $1; then
- reason="threads"; tag="threads"
- elif grep -qE "requires.*thread support" $1; then
- reason="threads"; tag="threads"
- elif grep -q "/usr/bin/ld: cannot find -lpthread" $1; then
- reason="threads"; tag="threads"
- elif grep -q "/usr/bin/ld: cannot find -lXThrStub" $1; then
- reason="threads"; tag="threads"
-
- else
- reason="???"; tag="unknown"
- fi
+if [ $# != 1 -o "x$1" != "x`dirname $1`/*.log" ]; then
+ while [ ! -z "$1" ]; do
+ filename=$(basename $1)
+ #echo 'processlogs: at '`date`', examining '$filename'
- broken="no"
- if grep -q "Trying build of .* even though it is marked BROKEN" $1; then
- broken="broken"
- fi
+ $errorscript $filename $indexlogdir >> .logs
shift
-
- echo "$filename|$portname|$affected|$logsize|$dir|$maintainer|$reason|$tag|$broken|$datetime" >> .logs
done
fi
+# echo 'processlogs: at '`date`', end processing log files'
# XXX Sometimes log entries get doubled up for some reason
uniq .logs > .logs2
@@ -343,7 +76,8 @@ header() {
if [ -s cvsdone ]; then
echo "CVS update finished at: $(cat cvsdone)<br>" >> $of
fi
- echo "Timestamp of newest log: $(ls -rtTl *.log | tail -1 | awk '{printf("%s %s %s %s\n",$6,$7,$8,$9)}')<br><br>" >> $of
+ latest=$(cd $buildlogdir; ls -rtTl *.log | tail -1 | awk '{printf("%s %s %s %s\n",$6,$7,$8,$9)}';)
+ echo "Timestamp of newest log: $latest<br><br>" >> $of
echo "\"Aff.\" is number of ports that depend on this one<br>" >> $of
echo "\"<font color=\"red\">[B]</font>\" indicates port is marked BROKEN<br><br>" >> $of
echo "<p>$num errors</p>" >> $of
@@ -358,21 +92,33 @@ footer() {
echo "</html>" >>$of
}
+# Now reread the .logs file and create the reports. If the .logs file
+# has blanks in any field, this code won't work. Therefore, the
+# code above has to guarantee that that won't happen, and the code
+# below has to catch the metatoken.
+
+# echo 'processlogs: at '`date`', create default output'
#
# Create "default" output, sorted on portname
#
header "<th>Port</th><th>Aff.</th><th>Size</th><th>CVS</th><th>Maintainer</th><th>Reason</th><th>Build date</th>"
for i in `cat .logs | sort`; do
- set $(echo $i | tr \| " ")
+ set $(echo "$i" | tr \| " " | sed -e "s@NONE@\\&nbsp;@g")
+ mailto="$6"
+ if [ "$6" != "&nbsp;" ] ; then
+ mailto="<a href=\"mailto:$6\">$6</a>"
+ fi
+
echo "<tr>" >> $of
+
echo "<td><a href=\"$1\">$2</a></td>" >> $of
affby=$3
test $affby = "0" -o $affby = "-1" && affby="&nbsp;"
echo "<td align=\"right\">$affby</td><td align=\"right\">$4 Kb</td>" >> $of
echo "<td><a href=\"http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/$5\">$5</a></td>" >> $of
- echo "<td><a href=\"mailto:$6\">$6</a></td>" >> $of
+ echo "<td>$mailto</td>" >> $of
echo "<td>" >> $of
test "$9" = "broken" && echo "<font color=\"red\">[B]</font>" >> $of
@@ -388,21 +134,28 @@ done
footer ""
mv -f $of index.html
+# echo 'processlogs: at '`date`', create output sorted by category'
#
# Create output by category
#
header "<th>CVS</th><th>Aff.</th><th>Size</th><th>Port</th><th>Maintainer</th><th>Reason</th><th>Build date</th>"
for i in `cat .logs | sort -t \\| +4`; do
- set $(echo $i | tr \| " ")
+ set $(echo "$i" | tr \| " " | sed -e "s@NONE@\\&nbsp;@g")
+ mailto="$6"
+ if [ "$6" != "&nbsp;" ] ; then
+ mailto="<a href=\"mailto:$6\">$6</a>"
+ fi
+
echo "<tr>" >> $of
+
echo "<td><a href=\"http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/$5\">$5</a></td>" >> $of
affby=$3
test $affby = "0" -o $affby = "-1" && affby="&nbsp;"
echo "<td align=\"right\">$affby</td><td align=\"right\">$4 Kb</td>" >> $of
echo "<td><a href=\"$1\">$2</a></td>" >> $of
- echo "<td><a href=\"mailto:$6\">$6</a></td>" >> $of
+ echo "<td>$mailto</td>" >> $of
echo "<td>" >> $of
test "$9" = "broken" && echo "<font color=\"red\">[B]</font>" >> $of
@@ -418,15 +171,22 @@ done
footer ""
mv -f $of index-category.html
+# echo 'processlogs: at '`date`', create output sorted by maintainer'
#
# Create output by maintainer
#
header "<th>Maintainer</th><th>Port</th><th>Aff.</th><th>Size</th><th>CVS</th><th>Reason</th><th>Build date</th>"
for i in `cat .logs | sort -t \\| +5`; do
- set $(echo $i | tr \| " ")
+ set $(echo "$i" | tr \| " " | sed -e "s@NONE@\\&nbsp;@g")
+ mailto="$6"
+ if [ "$6" != "&nbsp;" ] ; then
+ mailto="<a href=\"mailto:$6\">$6</a>"
+ fi
+
echo "<tr>" >> $of
- echo "<td><a href=\"mailto:$6\">$6</a></td>" >> $of
+
+ echo "<td>$mailto</td>" >> $of
echo "<td><a href=\"$1\">$2</a></td>" >> $of
affby=$3
@@ -448,13 +208,19 @@ done
footer ""
mv -f $of index-maintainer.html
+# echo 'processlogs: at '`date`', create output sorted by error'
#
# Create output by error
#
header "<th>Reason</th><th>Port</th><th>Aff.</th><th>Size</th><th>CVS</th><th>Maintainer</th><th>Build date</th>"
for i in `cat .logs | sort -t \\| +7`; do
- set $(echo $i | tr \| " ")
+ set $(echo "$i" | tr \| " " | sed -e "s@NONE@\\&nbsp;@g")
+ mailto="$6"
+ if [ "$6" != "&nbsp;" ] ; then
+ mailto="<a href=\"mailto:$6\">$6</a>"
+ fi
+
echo "<tr>" >> $of
echo "<td>" >> $of
@@ -469,7 +235,7 @@ for i in `cat .logs | sort -t \\| +7`; do
test $affby = "0" -o $affby = "-1" && affby="&nbsp;"
echo "<td align=\"right\">$affby</td><td align=\"right\">$4 Kb</td>" >> $of
echo "<td><a href=\"http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/$5\">$5</a></td>" >> $of
- echo "<td><a href=\"mailto:$6\">$6</a></td>" >> $of
+ echo "<td>$mailto</td>" >> $of
date=$(echo ${10} | tr '_' ' ')
echo "<td>$date</td>" >> $of
@@ -479,13 +245,19 @@ done
footer ""
mv -f $of index-reason.html
+# echo 'processlogs: at '`date`', create output sorted by builddate'
#
# Create output by builddate
#
header "<th>Build date</th><th>Port</th><th>Aff.</th><th>Size</th><th>CVS</th><th>Maintainer</th><th>Reason</th>"
for i in `cat .logs | sort -t \\| +9`; do
- set $(echo $i | tr \| " ")
+ set $(echo "$i" | tr \| " " | sed -e "s@NONE@\\&nbsp;@g")
+ mailto="$6"
+ if [ "$6" != "&nbsp;" ] ; then
+ mailto="<a href=\"mailto:$6\">$6</a>"
+ fi
+
echo "<tr>" >> $of
date=$(echo ${10} | tr '_' ' ')
@@ -497,7 +269,7 @@ for i in `cat .logs | sort -t \\| +9`; do
test $affby = "0" -o $affby = "-1" && affby="&nbsp;"
echo "<td align=\"right\">$affby</td><td align=\"right\">$4 Kb</td>" >> $of
echo "<td><a href=\"http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/$5\">$5</a></td>" >> $of
- echo "<td><a href=\"mailto:$6\">$6</a></td>" >> $of
+ echo "<td>$mailto</td>" >> $of
echo "<td>" >> $of
test "$9" = "broken" && echo "<font color=\"red\">[B]</font>" >> $of
@@ -510,15 +282,23 @@ done
footer ""
mv -f $of index-builddate.html
+# echo 'processlogs: at '`date`', create maintainer list'
#
# Get list of maintainers.
#
for i in `cat .logs | sort -t \\| +9`; do
- set $(echo $i | tr \| " ")
+ set $(echo "$i" | tr \| " " | sed -e "s@NONE@\\&nbsp;@g")
+ mailto="$6"
+ if [ "$6" != "&nbsp;" ] ; then
+ mailto="<a href=\"mailto:$6\">$6</a>"
+ fi
+
maints="$maints $6"
done
echo $maints | sed -e 's/ /\
/g' | sort -fu > maintainers
+# now remove the lockfile for this invocation, and exit
rm .lock
+# echo 'processlogs: at '`date`', end'
diff --git a/Tools/portbuild/scripts/processonelog b/Tools/portbuild/scripts/processonelog
new file mode 100755
index 000000000000..02cea306bac6
--- /dev/null
+++ b/Tools/portbuild/scripts/processonelog
@@ -0,0 +1,336 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# Read a single errorlogfile and output a line of the format
+# $filename|$portname|$affected|$logsize|$dir|$maintainer|\
+# $reason|$tag|$broken|$datetime
+#
+# Originally factored out of: ports/Tools/portbuild/scripts/processlogs
+
+filename=$1
+indexdir=.
+if [ "$2" != "" ]; then indexdir=$2; fi
+indexdir=$(realpath $indexdir)
+indexfilename=$indexdir/INDEX
+
+portname=$(basename $filename .log)
+affected=$(($(grep -cF $portname < $indexfilename) -1))
+logsize=$(/bin/ls -sk $filename | awk '{print $1}')
+dir=$(sed -n -e '3p' $filename | grep '^with arguments' | awk '{print $4}' | \
+ sed -e 's,^/[^/]*/[^/]*/,,')
+maintainer=$(sed -n -e '4p' $filename | grep '^maintained by' | awk '{print $3}')
+datetime=$(sed -n -e '5p' $filename | grep '^build started at' | \
+ sed -e 's/build started at ...//' | tr ' ' '_' )
+
+# now try to classify the type of error found in the file.
+# the first case handles failures to even try to build any
+# port (i.e. HTML file no longer there, bento being unable
+# to fetch any file, bento being able to build any port, etc.)
+if [ -z "$dir" -o -z "$datetime" ]; then
+ reason="cluster"; tag="cluster"
+elif grep -q 'list of extra files and directories' $1; then
+ reason="mtree"; tag="mtree"
+elif grep -q "See <URL:http://gcc.gnu.org/bugs.html> for instructions." $1; then
+ reason="gcc_bug"; tag="gcc-bug"
+elif grep -q "See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions." $1; then
+ reason="gcc_bug"; tag="gcc-bug"
+elif grep -q 'Checksum mismatch' $1; then
+ reason="checksum"; tag="checksum"
+elif grep -qE '/usr/local/bin/(perl|perl5.6.1):.*(not found|No such file or directory)' $1; then
+ reason="perl"; tag="perl"
+elif grep -qE 'perl(.*): Perl is not installed, try .pkg_add -r perl.' $1; then
+ reason="perl"; tag="perl"
+elif grep -q 'cannot find -lc_r' $1; then
+ reason="threads"; tag="threads"
+elif grep -q "checking for.*lc_r\.\.\. no" $1; then
+ reason="threads"; tag="threads"
+elif grep -qE '(No checksum recorded for|(Maybe|Either) .* is out of date, or)' $1; then
+ reason="distinfo_update"; tag="distinfo"
+elif grep -q "checking whether apxs works.*apxs: not found" $1; then
+ reason="apxs"; tag="apxs"
+elif grep -qE '(configure: error:|script.*failed: here are the contents of)' $1; then
+ if grep -qE "configure: error: cpu .* not supported" $1; then
+ reason="arch"; tag="arch"
+ elif grep -qE "configure: error: (This program requires STL to compile|One or more.*STL headers are missing)" $1; then
+ reason="stl"; tag="stl"
+ elif grep -qE "configure: error: [Pp]erl (5.* required|version too old)" $1; then
+ reason="perl"; tag="perl"
+ else
+ reason="configure_error"; tag="configure"
+ fi
+elif grep -qE '(bison:.*(No such file|not found)|multiple definition of `yy)' $1; then
+ reason="bison"; tag="bison"
+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 'Error: category .* not in list of valid categories' $1; then
+ reason="CATEGORIES"; tag="categories"
+elif grep -q 'make: don.t know how to make .*\.man. Stop' $1; then
+ reason="X_manpage"; tag="xfree4man"
+elif grep -q 'Xm/Xm\.h: No such file' $1; then
+ reason="MOTIF"; tag="motif"
+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 -qE "(crt0|c\+\+rt0)\.o: No such file" $1; then
+ reason="ELF"; tag="elf"
+elif grep -q "machine/soundcard.h: No such file or directory" $1; then
+ reason="soundcard.h"; tag="soundcard.h"
+elif grep -q "values.h: No such file or directory" $1; then
+ reason="values.h"; tag="values.h"
+elif grep -q ".*\.h: No such file" $1; then
+ if grep -qE "(X11/.*|Xosdefs)\.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 "pnohang: killing make checksum" $1; then
+ reason="fetch_timeout"; tag="fetch-timeout"
+elif grep -q "USER PID PPID PGID JOBC STAT TT TIME COMMAND" $1; then
+ reason="runaway_process"; tag="runaway"
+elif grep -q "pnohang: killing make package" $1; then
+ reason="runaway_process"; tag="runaway"
+elif grep -q "cd: can't cd to" $1; then
+ reason="NFS"; tag="nfs"
+elif grep -qE "pkg_add: (can't find enough temporary space|projected size of .* exceeds available free space)" $1; then
+ reason="disk_full"; tag="df"
+elif grep -qE '(parse error|too (many|few) arguments to|argument.*doesn.*prototype|incompatible type for argument|conflicting types for|undeclared \(first use (in |)this function\)|incorrect number of parameters|has incomplete type and cannot be initialized)' $1; then
+ reason="compiler_error"; tag="cc"
+elif grep -qE '(ANSI C.. forbids|is a contravariance violation|changed for new ANSI .for. scoping|[0-9]: passing .* changes signedness|discards qualifiers|lacks a cast|redeclared as different kind of symbol|invalid type .* for default argument to|wrong type argument to unary exclamation mark|duplicate explicit instantiation of|incompatible types in assignment|assuming . on overloaded member function|call of overloaded .* is ambiguous|declaration of C function .* conflicts with|initialization of non-const reference type|using typedef-name .* after|[0-9]: implicit declaration of function|[0-9]: size of array .* is too large|fixed or forbidden register .* for class)' $1; then
+ reason="new_compiler_error"; tag="newgcc"
+elif grep -qE '(syntax error before|ISO C\+\+ forbids|friend declaration|no matching function for call to|.main. must return .int.|invalid conversion from|cannot be used as a macro name as it is an operator in C\+\+|is not a member of type|after previous specification in|no class template named|because worst conversion for the former|better than worst conversion|no match for.*operator|no match for call to|undeclared in namespace|is used as a type, but is not)' $1; then
+ reason="bad_C++_code"; tag="badc++"
+elif grep -qE '(/usr/libexec/elf/ld: cannot find|undefined reference to|cannot open -l.*: No such file)' $1; then
+ reason="linker_error"; tag="ld"
+elif grep -qE 'chown:.*invalid argument' $1; then
+ reason="chown"; tag="chown"
+elif grep -qE 'cp:.*Invalid argument' $1; then
+ reason="munmap"; tag="munmap"
+elif grep -q 'install: .*: No such file' $1; then
+ if grep -q 'install: /usr/local/www/cgi-bin.*No such file or directory' $1; then
+ reason="cgi-bin"; tag="cgi-bin"
+ else
+ reason="install_error"; tag="install"
+ fi
+elif grep -q "/usr/.*/man/.*: No such file or directory" $1; then
+ reason="manpage"; tag="manpage"
+elif grep -q "pkg_create: make_dist: tar command failed with code" $1; then
+ reason="PLIST"; tag="plist"
+elif grep -qE "(Can't|unable to) open display" $1; then
+ reason="DISPLAY"; tag="display"
+elif grep -q " is already installed - perhaps an older version" $1; then
+ reason="depend_object"; tag="dependobj"
+elif grep -q "error in dependency .*, exiting" $1; then
+ reason="depend_package"; tag="dependpkg"
+elif grep -q "#error \"<malloc.h> has been replaced by <stdlib.h>\"" $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"
+elif grep -q "Error: alignment not a power of 2" $1; then
+ reason="alignment"; tag="alignment"
+elif grep -qE "bin.apxs:(.)(not found|No such file or directory)" $1; then
+ reason="apxs"; tag="apxs"
+elif grep -qE "failed to exec .*bin/apxs" $1; then
+ reason="apxs"; tag="apxs"
+elif grep -q ".s: Assembler messages:" $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "Cannot (determine .* target|find the byte order) for this architecture" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "cast from pointer to integer of different size" $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "^cc1: bad value.*for -mcpu.*switch" $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "^cc1: invalid option " $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "Configuration .* not supported" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "could not read symbols: File in wrong format" $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "[Ee]rror: [Uu]nknown opcode" $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "error.*Unsupported architecture" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "ENDIAN must be defined 0 or 1" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "failed to merge target-specific data" $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "(file not recognized|failed to set dynamic section sizes): File format not recognized" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "impossible register constraint" $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "inconsistent operand constraints in an .asm" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "invalid lvalue in asm statement" $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "is only for.*, and you are running" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "not a valid 64 bit base/index expression" $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "relocation R_X86_64_32.*can not be used when making a shared object" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "relocation truncated to fit: " $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "The target cpu, .*, is not currently supported." $1; then
+ reason="arch"; tag="arch"
+elif grep -q "This architecture seems to be neither big endian nor little endian" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "unknown register name" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "Unable to correct byte order" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "Unsupported platform, sorry" $1; then
+ reason="arch"; tag="arch"
+elif grep -q "won't run on this architecture" $1; then
+ reason="arch"; tag="arch"
+elif grep -qE "#error .Cannot compile:" $1; then
+ reason="assert"; tag="assert"
+elif grep -qE "autoconf(.*): not found" $1; then
+ reason="autoconf"; tag="autoconf"
+elif grep -qE "autoconf(.*): No such file or directory" $1; then
+ reason="autoconf"; tag="autoconf"
+elif grep -q "autoheader: not found" $1; then
+ reason="autoheader"; tag="autoheader"
+elif grep -qE "automake(.*): not found" $1; then
+ reason="automake"; tag="automake"
+elif grep -q "awk: empty regular expression" $1; then
+ reason="awk"; tag="awk"
+elif grep -qE "(mv:|mv: rename|cannot open) y.tab.c(.*): No such file or directory" $1; then
+ reason="bison"; tag="bison"
+elif grep -q "sorry, cannot determine the header file bison generates" $1; then
+ reason="bison"; tag="bison"
+elif grep -q "usage: yacc" $1; then
+ reason="bison"; tag="bison"
+elif grep -q "/usr/local/www/cgi-bin does not exist" $1; then
+ reason="cgi-bin"; tag="cgi-bin"
+elif grep -qE "chown: .*\..*: Invalid argument" $1; then
+ reason="chown"; tag="chown"
+elif grep -qE "cp: .*: Invalid argument" $1; then
+ reason="munmap"; tag="munmap"
+elif grep -q "Cannot stat: " $1; then
+ reason="configure_error"; tag="configure"
+elif grep -qE "Script.*configure.*failed unexpectedly" $1; then
+ reason="configure_error"; tag="configure"
+elif grep -q "Cannot open /dev/tty for read" $1; then
+ reason="DISPLAY"; tag="display"
+elif grep -q "RuntimeError: cannot open display" $1; then
+ reason="DISPLAY"; tag="display"
+elif grep -q "You must run this program under the X-Window System" $1; then
+ reason="DISPLAY"; tag="display"
+elif grep -q "ld: unrecognised emulation mode: elf_i386" $1; then
+ reason="ELF"; tag="elf"
+elif grep -qE "Member name contains .\.\." $1; then
+ reason="fetch"; tag="fetch"
+elif grep -q "fetch: transfer timed out" $1; then
+ reason="fetch_timeout"; tag="fetch-timeout"
+elif grep -q "fetch: transfer timed out" $1; then
+ reason="fetch_timeout"; tag="fetch-timeout"
+elif grep -q "strings.h:.* previous declaration of .int ffs" $1; then
+ reason="ffs_conflict"; tag="ffs_conflict"
+elif grep -q "is forbidden: FreeBSD-SA-" $1; then
+ reason="forbidden"; tag="forbidden"
+elif grep -q "/usr/bin/ld: cannot find -lgnugetopt" $1; then
+ reason="getopt"; tag="getopt"
+elif grep -qE "previous declaration.*int getopt" $1; then
+ reason="getopt.h"; tag="getopt.h"
+elif grep -q "imake: Exit code 1" $1; then
+ reason="imake"; tag="imake"
+elif grep -q 'Run-time system build failed for some reason' $1; then
+ reason="install_error"; tag="install"
+elif grep -q "/usr/bin/ld: cannot find -lc_r" $1; then
+ reason="lc_r"; tag="lc_r"
+elif grep -q "cc: .*libintl.*: No such file or directory" $1; then
+ reason="linker_error"; tag="ld"
+elif grep -qE "cc: ndbm\.so: No such file or directory" $1; then
+ reason="linker_error"; tag="ld"
+elif grep -q "error: The X11 shared library could not be loaded" $1; then
+ reason="linker_error"; tag="ld"
+elif grep -q "relocation against dynamic symbol" $1; then
+ reason="linker_error"; tag="ld"
+elif grep -qE "make.*(don.t know how to make|fatal errors encountered|No rule to make target|built-in)" $1; then
+ reason="makefile"; tag="makefile"
+elif grep -qE "Error: mtree file ./etc/mtree/BSD.local.dist. is missing" $1; then
+ reason="mtree"; tag="mtree"
+elif grep -qE "cp:.*site_perl: No such file or directory" $1; then
+ reason="perl"; tag="perl"
+elif grep -q "Perl .* required--this is only version" $1; then
+ reason="perl"; tag="perl"
+elif grep -q "pod2man: not found" $1; then
+ reason="pod2man"; tag="pod2man"
+elif grep -q "Syntax error: .(. unexpected (expecting .fi.)" $1; then
+ reason="portcomment"; tag="portcomment"
+elif grep -q "Abort trap" $1; then
+ reason="process_failed"; tag="process"
+elif grep -q "Bus error" $1; then
+ reason="process_failed"; tag="process"
+elif grep -q "Signal 11" $1; then
+ reason="process_failed"; tag="process"
+elif grep -q "USER PID PPID PGID JOBC STAT TT TIME COMMAND" $1; then
+ reason="process_failed"; tag="process"
+elif grep -q "python: not found" $1; then
+ reason="python"; tag="python"
+elif grep -qE "sed: illegal option" $1; then
+ reason="sed"; tag="sed"
+elif grep -qE "sed: [0-9]*:.*(RE error:|not defined in the RE|bad flag in substitute command|unescaped newline inside substitute pattern|invalid command code)" $1; then
+ reason="sed"; tag="sed"
+elif grep -q "Your STL string implementation is unusable" $1; then
+ reason="stl"; tag="stl"
+elif grep -q ': The -pthread option is deprecated' $1; then
+ reason="threads"; tag="threads"
+elif grep -q "Error: pthreads are required to build this package" $1; then
+ reason="threads"; tag="threads"
+elif grep -q "Please install/update your POSIX threads (pthreads) library" $1; then
+ reason="threads"; tag="threads"
+elif grep -qE "requires.*thread support" $1; then
+ reason="threads"; tag="threads"
+elif grep -q "/usr/bin/ld: cannot find -lpthread" $1; then
+ reason="threads"; tag="threads"
+elif grep -q "/usr/bin/ld: cannot find -lXThrStub" $1; then
+ reason="threads"; tag="threads"
+elif grep -q "<varargs.h> is obsolete with this version of GCC" $1; then
+ reason="varargs"; tag="varargs"
+
+else
+ reason="???"; tag="unknown"
+fi
+
+# XXX MCL perhaps segfault, coredump should be unified into process failed?
+
+# clean up some error cases -- the way .logs works, it expects that
+# every field in it MUST be nonblank, so we insert a metatoken here.
+# See below.
+if [ -z "$dir" ]; then
+ dir="NONE"
+fi
+if [ -z "$maintainer" ]; then
+ maintainer="NONE"
+fi
+if [ -z "$datetime" ]; then
+ datetime="NONE"
+fi
+
+broken="no"
+if grep -q "Trying build of .* even though it is marked BROKEN" $1; then
+ broken="broken"
+fi
+
+echo "$filename|$portname|$affected|$logsize|$dir|$maintainer|$reason|$tag|$broken|$datetime"