bad state after failure / nonworking mail server

John Marino marcuscom at marino.st
Thu Oct 27 07:24:19 EDT 2011


On 10/27/2011 11:16 AM, Joe Marcus Clarke wrote:
> If you do not have any users subscribed for build errors, emails
> shouldn't be sent.  But even so, a failure should not trigger the script
> to abort.  Can you mark up the code to see exactly where this abort is
> occurring?
> 
> Joe

Actually, I've previously seen something like this in the make.1(?) logs
after a failure:

usage: tc sendBuildErrorMail
       -b <build name> -d <port directory> -p <package name> [-l] [-x
       extension]

It may be that no mail is ever attempted (I don't recall seeing any
queued mails notices in the root's mailbox), and it's the usage function
that diverting the flow.

I didn't see what variable might be undefined that's triggering that
triggering the usage function though.  On portbuild, the line is:
${tc} sendBuildErrorMail -d ${portdir} -b ${build} -p ${pkgname} -x ${lext}

All those variables are defined except for $lext and the
sendBuildErrorMail function should handle -x by itself I think.  Maybe?

On the flipside, it would be better style not to leave $lext undefined.

It's defined on line 375/378 on portbuild, but that's under the "if [
"${error}" = "0" ]" condition of line 359.

The single user on this system has an email address, but the option to
send an email after the build is not checked off.  So it's aborting
before it gets to the actual sendmail command, most likely.

John


More information about the tinderbox-list mailing list