ports/61914: [patch] reduce false positives in processonelog

Mark Linimon linimon at FreeBSD.org
Mon Jan 26 01:10:20 UTC 2004


>Number:         61914
>Category:       ports
>Synopsis:       [patch] reduce false positives in processonelog
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 25 17:10:16 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Mark Linimon
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
Lonesome Dove Computing Services
>Environment:
	(n/a)
>Description:
	The ordering of the tests in processonelog produces false
	positives, in particular for the PLIST description.
>How-To-Repeat:
	See bento logs for amd64-5-latest.
>Fix:
	The following patch corrects several problems:

	- the tests for "Cannot stat", "can't cd", and "tar command
	  failed" are moved to the bottom.  This will sacrifice
	  a little bit of performance for a gain in accuracy.
	- the tests for "configuration errors" needed to be combined
	  and tweaked to better identify errors that are architecture-
	  specific (usuallly the "all pointers are ints" assumption)
	- the detection of chown was buggy
	- there were some duplicate test cases
	- as an experiment, another test for dependency problems is added

--- processonelog.dist	Sun Jan 25 15:43:08 2004
+++ processonelog	Sun Jan 25 18:52:24 2004
@@ -48,7 +48,10 @@
   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
+# note: must run before the configure_error check
+elif grep -qE "Configuration .* not supported" $1; then
+  reason="arch"; tag="arch"
+elif grep -qE '(configure: error:|Script.*configure.*failed unexpectedly|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
@@ -102,8 +105,6 @@
   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
@@ -114,7 +115,7 @@
   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
+elif grep -qE 'chown:.*[Ii]nvalid argument' $1; then
   reason="chown"; tag="chown"
 #elif grep -qE 'cp:.*Invalid argument' $1; then
 #  reason="munmap"; tag="munmap"
@@ -126,12 +127,12 @@
   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 "You may wish to ..make deinstall.. and install this port again" $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
@@ -162,8 +163,6 @@
   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
@@ -222,14 +221,8 @@
   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
@@ -284,8 +277,6 @@
   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
@@ -308,6 +299,18 @@
   reason="threads"; tag="threads"
 elif grep -q "<varargs.h> is obsolete with this version of GCC" $1; then
   reason="varargs"; tag="varargs"
+
+# Although these can be fairly common, and thus in one sense ought to be
+# earlier in the evaluation, in practice they are most often secondary
+# types of errors, and thus need to be evaluated after all the specific         
+# cases.
+
+elif grep -q "Cannot stat: " $1; then
+  reason="configure_error"; tag="configure"
+elif grep -q "cd: can't cd to" $1; then
+  reason="NFS"; tag="nfs"
+elif grep -q "pkg_create: make_dist: tar command failed with code" $1; then
+  reason="PLIST"; tag="plist"
 
 else
   reason="???"; tag="unknown"
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list