diff options
author | Mark Linimon <linimon@FreeBSD.org> | 2007-02-13 21:58:21 +0000 |
---|---|---|
committer | Mark Linimon <linimon@FreeBSD.org> | 2007-02-13 21:58:21 +0000 |
commit | b0904b6955d57aca9d8c7e2699a7d37b2daff88d (patch) | |
tree | 666b018746b65d707125b785644f1e35b8e5a6dd /Tools | |
parent | Update to 0.1.13 (diff) |
Combine all like terms to get another 10% speedup in processing time.
There is no change in any of the individual terms; this is merely a
rearrangement.
This change undoes what I was trying to do back in 2004 of breaking up
each individual test into a grep, for readability. The performance of
the script has continued to suffer as new greps were added over time,
to the point where this is now a bad tradeoff.
Notes
Notes:
svn path=/head/; revision=185118
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/processonelog | 129 |
1 files changed, 13 insertions, 116 deletions
diff --git a/Tools/portbuild/scripts/processonelog b/Tools/portbuild/scripts/processonelog index 9f09daa9b68a..992d2ffea847 100755 --- a/Tools/portbuild/scripts/processonelog +++ b/Tools/portbuild/scripts/processonelog @@ -38,9 +38,7 @@ datetime=$(${cat} $errordir/$filename | head -6 | grep '^build started at' | \ # to fetch any file, pointyhat being able to build any port, etc.) if [ -z "$dir" -o -z "$datetime" ]; then reason="cluster"; tag="cluster" -elif bzgrep -q 'list of extra files and directories' $1; then - reason="mtree"; tag="mtree" -elif bzgrep -qE "(Error: mtree file ./etc/mtree/BSD.local.dist. is missing|error in pkg_delete|filesystem was touched prior to .make install|list of files present before this port was installed|list of filesystem changes from before and after)" $1; then +elif bzgrep -qE "(Error: mtree file ./etc/mtree/BSD.local.dist. is missing|error in pkg_delete|filesystem was touched prior to .make install|list of extra files and directories|list of files present before this port was installed|list of filesystem changes from before and after)" $1; then reason="mtree"; tag="mtree" # note: must run before the configure_error check elif bzgrep -qE "Configuration .* not supported" $1; then @@ -79,68 +77,16 @@ elif bzgrep -qE '(/usr/libexec/elf/ld: cannot find|undefined reference to|cannot reason="linker_error"; tag="ld" elif bzgrep -q 'install: .*: No such file' $1; then reason="install_error"; tag="install" -elif bzgrep -q "conflicts with installed package" $1; then - reason="depend_object"; tag="dependobj" -elif bzgrep -q " is already installed - perhaps an older version" $1; then - reason="depend_object"; tag="dependobj" -elif bzgrep -q "You may wish to ..make deinstall.. and install this port again" $1; then +elif bzgrep -qE "(conflicts with installed package|is already installed - perhaps an older version|You may wish to ..make deinstall.. and install this port again)" $1; then reason="depend_object"; tag="dependobj" elif bzgrep -q "core dumped" $1; then reason="coredump"; tag="coredump" # below here are the less common items -elif bzgrep -q ".s: Assembler messages:" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "Cannot (determine .* target|find the byte order) for this architecture" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "^cc1: bad value.*for -mcpu.*switch" $1; then - reason="arch"; tag="arch" -elif bzgrep -q "could not read symbols: File in wrong format" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "[Ee]rror: [Uu]nknown opcode" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "error.*Unsupported architecture" $1; then - reason="arch"; tag="arch" -elif bzgrep -q "ENDIAN must be defined 0 or 1" $1; then - reason="arch"; tag="arch" -elif bzgrep -q "failed to merge target-specific data" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "(file not recognized|failed to set dynamic section sizes): File format not recognized" $1; then - reason="arch"; tag="arch" -elif bzgrep -q "impossible register constraint" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "inconsistent operand constraints in an .asm" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "Invalid configuration.*unknown.*machine.*unknown not recognized" $1; then - reason="arch"; tag="arch" -elif bzgrep -q "invalid lvalue in asm statement" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "is only for.*, and you are running" $1; then - reason="arch"; tag="arch" -elif bzgrep -q "not a valid 64 bit base/index expression" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "relocation R_X86_64_32.*can not be used when making a shared object" $1; then - reason="arch"; tag="arch" -elif bzgrep -q "relocation truncated to fit: " $1; then - reason="arch"; tag="arch" -elif bzgrep -q "shminit failed: Function not implemented" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "The target cpu, .*, is not currently supported." $1; then - reason="arch"; tag="arch" -elif bzgrep -q "This architecture seems to be neither big endian nor little endian" $1; then - reason="arch"; tag="arch" -elif bzgrep -q "unknown register name" $1; then - reason="arch"; tag="arch" -elif bzgrep -q "Unable to correct byte order" $1; then - reason="arch"; tag="arch" -elif bzgrep -q "Unsupported platform, sorry" $1; then +elif bzgrep -qE "(.s: Assembler messages:|Cannot (determine .* target|find the byte order) for this architecture|^cc1: bad value.*for -mcpu.*switch|could not read symbols: File in wrong format|[Ee]rror: [Uu]nknown opcode|error.*Unsupported architecture|ENDIAN must be defined 0 or 1|failed to merge target-specific data|(file not recognized|failed to set dynamic section sizes): File format not recognized|impossible register constraint|inconsistent operand constraints in an .asm|Invalid configuration.*unknown.*machine.*unknown not recognized|invalid lvalue in asm statement|is only for.*, and you are running|not a valid 64 bit base/index expression|relocation R_X86_64_32.*can not be used when making a shared object|relocation truncated to fit: |shminit failed: Function not implemented|The target cpu, .*, is not currently supported.|This architecture seems to be neither big endian nor little endian|unknown register name|Unable to correct byte order|Unsupported platform, sorry|won't run on this architecture)" $1; then reason="arch"; tag="arch" -elif bzgrep -q "won't run on this architecture" $1; then - reason="arch"; tag="arch" -elif bzgrep -qE "autoconf(.*): not found" $1; then - reason="autoconf"; tag="autoconf" -elif bzgrep -qE "autoconf(.*): No such file or directory" $1; then +elif bzgrep -qE "autoconf(.*): (not found|No such file or directory)" $1; then reason="autoconf"; tag="autoconf" elif bzgrep -q "autoheader: not found" $1; then reason="autoheader"; tag="autoheader" @@ -156,41 +102,18 @@ elif bzgrep -q "error in dependency .*, exiting" $1; then reason="depend_package"; tag="dependpkg" elif bzgrep -qE "pkg_(add|create):.*(can't find enough temporary space|projected size of .* exceeds available free space)" $1; then reason="disk_full"; tag="df" -elif bzgrep -qE "(Can't|unable to) open display" $1; then - reason="DISPLAY"; tag="display" -elif bzgrep -q "Cannot open /dev/tty for read" $1; then - reason="DISPLAY"; tag="display" -elif bzgrep -q "RuntimeError: cannot open display" $1; then - reason="DISPLAY"; tag="display" -elif bzgrep -q "You must run this program under the X-Window System" $1; then - reason="DISPLAY"; tag="display" +elif bzgrep -qE "((Can't|unable to) open display|Cannot open /dev/tty for read|RuntimeError: cannot open display|You must run this program under the X-Window System)" $1; then elif bzgrep -qE '(No checksum recorded for|(Maybe|Either) .* is out of date, or)' $1; then reason="distinfo_update"; tag="distinfo" elif bzgrep -qE "Member name contains .\.\." $1; then reason="fetch"; tag="fetch" -elif bzgrep -q "pnohang: killing make checksum" $1; then - reason="fetch_timeout"; tag="fetch-timeout" -elif bzgrep -q "fetch: transfer timed out" $1; then +elif bzgrep -qE "(pnohang: killing make checksum|fetch: transfer timed out)" $1; then reason="fetch_timeout"; tag="fetch-timeout" elif bzgrep -q "See <URL:http://gcc.gnu.org/bugs.html> for instructions." $1; then reason="gcc_bug"; tag="gcc-bug" -elif bzgrep -q "See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions." $1; then - reason="gcc_bug"; tag="gcc-bug" -elif bzgrep -q 'Run-time system build failed for some reason' $1; then - reason="install_error"; tag="install" -elif bzgrep -q 'tar: Error opening archive: Failed to open.*No such file or directory' $1; then +elif bzgrep -qE "(Run-time system build failed for some reason|tar: Error opening archive: Failed to open.*No such file or directory)" $1; then reason="install_error"; tag="install" -elif bzgrep -q "cc: .*libintl.*: No such file or directory" $1; then - reason="linker_error"; tag="ld" -elif bzgrep -qE "cc: ndbm\.so: No such file or directory" $1; then - reason="linker_error"; tag="ld" -elif bzgrep -q "error: The X11 shared library could not be loaded" $1; then - reason="linker_error"; tag="ld" -elif bzgrep -q "libtool: link: cannot find the library" $1; then - reason="linker_error"; tag="ld" -elif bzgrep -q "relocation against dynamic symbol" $1; then - reason="linker_error"; tag="ld" -elif bzgrep -q "Shared object.*not found, required by" $1; then +elif bzgrep -qE "(cc: .*libintl.*: No such file or directory|cc: ndbm\.so: No such file or directory|error: The X11 shared library could not be loaded|libtool: link: cannot find the library|relocation against dynamic symbol|Shared object.*not found, required by)" $1; then reason="linker_error"; tag="ld" elif bzgrep -q "Could not create Makefile" $1; then reason="makefile"; tag="makefile" @@ -200,27 +123,15 @@ elif bzgrep -q "/usr/.*/man/.*: No such file or directory" $1; then reason="manpage"; tag="manpage" elif bzgrep -q "out of .* hunks .*--saving rejects to" $1; then reason="patch"; tag="patch" -elif bzgrep -qE '/usr/local/bin/(perl|perl5.6.1):.*(not found|No such file or directory)' $1; then - reason="perl"; tag="perl" -elif bzgrep -qE 'perl(.*): Perl is not installed, try .pkg_add -r perl.' $1; then - reason="perl"; tag="perl" -elif bzgrep -qE "cp:.*site_perl: No such file or directory" $1; then - reason="perl"; tag="perl" -elif bzgrep -q "Perl .* required--this is only version" $1; then +elif bzgrep -qE "(/usr/local/bin/(perl|perl5.6.1):.*(not found|No such file or directory)|cp:.*site_perl: No such file or directory|perl(.*): Perl is not installed, try .pkg_add -r perl|Perl .* required--this is only version)" $1; then reason="perl"; tag="perl" elif bzgrep -q 'BEGIN failed--compilation aborted at ..Makefile.PL line' $1; then reason="perl5"; tag="perl5" -elif bzgrep -q "Abort trap" $1; then - reason="process_failed"; tag="process" -elif bzgrep -q "Bus error" $1; then - reason="process_failed"; tag="process" -elif bzgrep -q "Signal 1[01]" $1; then +elif bzgrep -qE "(Abort trap|Bus error|Signal 1[01])" $1; then reason="process_failed"; tag="process" elif bzgrep -q "python: not found" $1; then reason="python"; tag="python" -elif bzgrep -qE "USER PID PPID PGID.*JOBC STAT TT TIME COMMAND" $1; then - reason="runaway_process"; tag="runaway" -elif bzgrep -q "pnohang: killing make package" $1; then +elif bzgrep -qE "(USER PID PPID PGID.*JOBC STAT TT TIME COMMAND|pnohang: killing make package)" $1; then reason="runaway_process"; tag="runaway" elif bzgrep -q "Segmentation fault" $1; then reason="segfault"; tag="segfault" @@ -230,21 +141,7 @@ elif bzgrep -q "structure has no member named" $1; then reason="struct_changes"; tag="struct" elif bzgrep -q "shminit failed: Permission denied" $1; then reason="sysvipc"; tag="sysvipc" -elif bzgrep -q 'cannot find -lc_r' $1; then - reason="threads"; tag="threads" -elif bzgrep -q "checking for.*lc_r\.\.\. no" $1; then - reason="threads"; tag="threads" -elif bzgrep -q ': The -pthread option is deprecated' $1; then - reason="threads"; tag="threads" -elif bzgrep -q "Error: pthreads are required to build this package" $1; then - reason="threads"; tag="threads" -elif bzgrep -q "Please install/update your POSIX threads (pthreads) library" $1; then - reason="threads"; tag="threads" -elif bzgrep -qE "requires.*thread support" $1; then - reason="threads"; tag="threads" -elif bzgrep -q "/usr/bin/ld: cannot find -lpthread" $1; then - reason="threads"; tag="threads" -elif bzgrep -q "/usr/bin/ld: cannot find -lXThrStub" $1; then +elif bzgrep -qE "(/usr/bin/ld: cannot find -l(pthread|XThrStub)|cannot find -lc_r|checking for.*lc_r\.\.\. no|Error: pthreads are required to build this package|Please install/update your POSIX threads (pthreads) library|requires.*thread support|: The -pthread option is deprecated)" $1; then reason="threads"; tag="threads" elif bzgrep -q "<varargs.h> is obsolete with this version of GCC" $1; then reason="varargs"; tag="varargs" @@ -257,7 +154,7 @@ elif bzgrep -qi 'read-only file system' $1; then # cases. elif bzgrep -q 'tar: Error exit delayed from previous errors' $1; then - reason="install_error"; tag="install" + reason="install_error"; tag="install" elif bzgrep -q "Cannot stat: " $1; then reason="configure_error"; tag="configure" elif bzgrep -q "/usr/bin/ld: cannot find -l" $1; then |