From linimon@lonesome.com  Thu Nov 13 18:06:07 2003
Return-Path: <linimon@lonesome.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 760E916A4CE; Thu, 13 Nov 2003 18:06:07 -0800 (PST)
Received: from mail.soaustin.net (mail.soaustin.net [207.200.4.66])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 1DDDC43FDF; Thu, 13 Nov 2003 18:06:04 -0800 (PST)
	(envelope-from linimon@lonesome.com)
Received: from lonesome.lonesome.com (cs242746-11.austin.rr.com [24.27.46.11])
	(using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))
	(No client certificate requested)
	by mail.soaustin.net (Postfix) with ESMTP
	id 7E88B1469C; Thu, 13 Nov 2003 20:06:03 -0600 (CST)
Received: from lonesome.lonesome.com (localhost.lonesome.com [127.0.0.1])
	by lonesome.lonesome.com (8.12.9/8.12.9) with ESMTP id hAE25K1K012929;
	Thu, 13 Nov 2003 20:05:20 -0600 (CST)
	(envelope-from linimon@lonesome.lonesome.com)
Received: (from linimon@localhost)
	by lonesome.lonesome.com (8.12.9/8.12.9/Submit) id hAE25K0g012928;
	Thu, 13 Nov 2003 20:05:20 -0600 (CST)
	(envelope-from linimon)
Message-Id: <200311140205.hAE25K0g012928@lonesome.lonesome.com>
Date: Thu, 13 Nov 2003 20:05:20 -0600 (CST)
From: Mark Linimon <linimon@lonesome.com>
Reply-To: Mark Linimon <linimon@lonesome.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: marcus@freebsd.org
Subject: [patch] add errortype column to bento "new build failures" reports
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         59272
>Category:       ports
>Synopsis:       [patch] add errortype column to bento "new build failures" reports
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 13 18:10:21 PST 2003
>Closed-Date:    Mon Jan 19 14:32:44 PST 2004
>Last-Modified:  Mon Jan 19 14:32:44 PST 2004
>Originator:     Mark Linimon
>Release:        FreeBSD 4.9-PRERELEASE i386
>Organization:
Lonesome Dove Computing Services
>Environment:
System: FreeBSD lonesome.lonesome.com 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Fri Sep 5 01:19:33 CDT 2003 linimon@lonesome.lonesome.com:/usr/src/sys/compile/MULTIMEDIA_DEBUG i386
>Description:
	The "new build failures" reports can be enhanced with the error
	type column to make them more useful.  Prerequisite: application
	of ports/50258.
>How-To-Repeat:
	(n/a)
>Fix:

	NB: I tested an earlier version of this script, but modified
	to run in my own environment, here.  It needs to be tested
	on the bento -exp runs before incorporation.

--- processfail.dist	Mon Oct 13 01:33:04 2003
+++ processfail	Thu Nov 13 19:56:30 2003
@@ -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 @@
   echo "</html>" >>$of
 }
 
+geterrortype() {
+  set $(echo `${errorscript} $logfile` | 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='|'
@@ -57,6 +66,10 @@
 #    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>" >> $of
+
+    logfile=$3.log
+    errortype=`geterrortype`
+    echo "<td>$errortype</td>" >> $of
 
     alphadate=$(date -jf %s ${date} "+%F %T")
     alphalast=$(date -jf %s ${last} "+%F %T")
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Nov 13 18:13:24 PST 2003 
Responsible-Changed-Why:  
Affects bento, so portmgr territory. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59272 

From: Mark Linimon <linimon@lonesome.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/59272: [patch] add errortype column to bento "new build failures" reports
Date: Mon, 12 Jan 2004 03:32:04 -0600

 This patch should replace the second half of the patch, above.
 
 --- index.shtml.dist	Sun Jan 11 21:09:47 2004
 +++ index.shtml	Mon Jan 12 03:22:37 2004
 @@ -352,7 +352,9 @@
  assembler or linker errors.  In some easy cases this is due to
  not picking up the various <tt>ARCH</tt> configuration variables
  in the Makefile; you'll see this via, e.g., a Sparc <tt>make</tt>
 -failing while looking for an i386 subdirectory.  In other cases
 +failing while looking for an i386 subdirectory.  For the 64-bit
 +architectures, a common problem is the assumption many programmers
 +make that pointers may be cast to and from 32-bit ints.  In other cases
  the problems run much deeper, in which case <tt>ONLY_FOR_ARCHS</tt>
  may be needed.</dd>
  
 @@ -373,7 +375,7 @@
  "autoheader">autoheader</a></dt>
  
  <dd>Your port depends on <tt>autoheader</tt>, but the <tt>Makefile</tt>
 -cannot find it.</dd>
 +cannot find it; set USE_AUTOHEADER.</dd>
  
  <dt><img alt="(uncommon)" src="/errorlogs/images/purple-ball.gif"><a tag=
  "automake">automake</a></dt>
 @@ -443,7 +445,7 @@
  <dt><img alt="(uncommon)" src="/errorlogs/images/purple-ball.gif"><a tag=
  "coredump">coredump</a></dt>
  
 -<dd>Some process dropped core. While your port may indeed be faulty,
 +<dd>Some process in the build chain dropped core. While your port may indeed 
 be faulty,
  the process that dropped core should also be fixed.</dd>
  
  <dt><img alt="(uncommon)" src="/errorlogs/images/purple-ball.gif"><a tag=
 @@ -527,6 +529,11 @@
  
  <dd><tt>&lt;getopt.h&gt;</tt> is conflicting with <tt>unistd.h</tt>.</dd>
  
 +<dt><img alt="(common)" src="bento_index_files/blue-ball.gif"><a tag=
 +"getopt">getopt</a></dt>
 +
 +<dd><tt>Your port may need to set the new port variable <tt>USE_GETOPT_LONG</
 tt>.</dd>
 +
  <dt><img alt="(common)" src="/errorlogs/images/blue-ball.gif"><a tag=
  "install">install error</a></dt>
  
 @@ -764,4 +771,3 @@
  | Maintained by <a href="mailto:portmgr@FreeBSD.org">portmgr@FreeBSD.org</a>
  </center>
  </body></html>
 -</html>
 
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Mon Jan 19 14:32:33 PST 2004 
State-Changed-Why:  
Committe, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59272 
>Unformatted:
