Redhat 5 compilation errors in xmem_error.c
Matthias Andree
matthias.andree at gmx.de
Sat Dec 7 04:25:06 CET 2002
Nick Simicich <njs at scifi.squawk.com> writes:
> make[3]: Leaving directory `/root/bogofilter/bogofilter-0.9.1/tests'
> make check-TESTS
> make[3]: Entering directory `/root/bogofilter/bogofilter-0.9.1/tests'
> ./t.score1: syntax error near unexpected token `then'
> FAIL: t.score1
> ./t.score2: syntax error near unexpected token `then'
> FAIL: t.score2
> ./t.integrity: syntax error near unexpected token `then'
> FAIL: t.integrity
> ./t.integrity2: syntax error near unexpected token `then'
> FAIL: t.integrity2
> ./t.lock1: syntax error near unexpected token `then'
> FAIL: t.lock1
> ./t.ignore_spam_header: syntax error near unexpected token `then'
> FAIL: t.ignore_spam_header
> ./t.nullstatsprefix: syntax error near unexpected token `then'
> FAIL: t.nullstatsprefix
> ./t.lexer: syntax error near unexpected token `then'
> FAIL: t.lexer
> ./t.systest: syntax error near unexpected token `then'
> FAIL: t.systest
> ./t.grftest: syntax error near unexpected token `then'
> FAIL: t.grftest
I figured bash1 doesn't like the
trap "if [ ... ] ; then ... ; else ... ; fi" 0
that is present in t.frame. It took me a while...
I also figured ash 0.2 doesn't treat
command1 && command2 properly. It exits if command1 fails when set -e is
in effect. Working around this.
Please try this patch for bash1 compatibility:
Index: tests/t.frame
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/tests/t.frame,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- tests/t.frame 4 Dec 2002 19:29:05 -0000 1.10
+++ tests/t.frame 7 Dec 2002 03:22:54 -0000 1.11
@@ -25,7 +25,11 @@
[ -d $TMPDIR ] && break
sleep 1
done
- trap "if test x$SUPPRESS_DELETE = x ; then rm -r -f core ${TMPDIR} ; else echo remove ${TMPDIR} and possibly crash the test ; fi" 0
+fi
+if test "x$SUPPRESS_DELETE" = "x" ; then
+ trap "rm -r -f core ${TMPDIR}" 0
+else
+ echo "clean up ${TMPDIR} after the test yourself"
fi
BOGOFILTER_DIR=$TMPDIR
--
Matthias Andree
More information about the Bogofilter
mailing list