On Thu, Oct 19, 2006 at 12:54:43PM +0100, Stephen Gran said: > On Wed, Oct 18, 2006 at 10:48:29PM +0100, Stephen Gran said: > > This is in reference to debian bug #393672, viewable at > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=393672 > > Sorry, the previous patch was wrong
As was that one, apparently - I thought I had tested it, but I clearly hadn't. Some artifact of the error producing machine that pounds on the keys, apparently. Some lessons learned: When evaluating a shell variable, remember to use $variable (not variable) Shells other than bash don't expand [:class:]+ - use [[:class:]]* Quote variables that might be unset before testing them This go round was actually tested and seems to produce the right results now: Index: configure.in =================================================================== --- configure.in (revision 168) +++ configure.in (working copy) @@ -178,9 +178,30 @@ sendmailver_b=`echo $sendmailver | awk -F. '{printf $2}'` sendmailver_c=`echo $sendmailver | awk -F. '{printf $3}'` - AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_A, $sendmailver_a, [major version of Sendmail]) - AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_B, $sendmailver_b, [minor version of Sendmail]) - AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_C, $sendmailver_c, [subversion of Sendmail]) + case "$sendmailver_a" in + [[[:digit:]]]*) ;; + *) sendmailver_a= ;; + esac + + case "$sendmailver_b" in + [[[:digit:]]]*) ;; + *) sendmailver_b= ;; + esac + + case "$sendmailver_c" in + [[[:digit:]]]*) ;; + *) sendmailver_c= ;; + esac + + if test -n "$sendmailver_a"; then + AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_A, $sendmailver_a, [major version of Sendmail]) + fi + if test -n "$sendmailver_b"; then + AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_B, $sendmailver_b, [minor version of Sendmail]) + fi + if test -n "$sendmailver_c"; then + AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_C, $sendmailver_c, [subversion of Sendmail]) + fi fi fi =================================================================== Sorry for so much noise for so little gain. -- -------------------------------------------------------------------------- | Stephen Gran | Remember, even if you win the rat race | | [EMAIL PROTECTED] | -- you're still a rat. | | http://www.lobefin.net/~steve | | --------------------------------------------------------------------------
signature.asc
Description: Digital signature
_______________________________________________ http://lurker.clamav.net/list/clamav-devel.html