[29693] trunk/base/portmgr/PortIndex2MySQL.tcl

source_changes at macosforge.org source_changes at macosforge.org
Fri Oct 5 13:10:00 PDT 2007


Revision: 29693
          http://trac.macosforge.org/projects/macports/changeset/29693
Author:   jmpp at macports.org
Date:     2007-10-05 13:10:00 -0700 (Fri, 05 Oct 2007)

Log Message:
-----------
Switch to the sendmail mailer program and adapt the script to it, thus fixing a strange error when running the script off launchd by whitch the contents of the runlog file were not being piped to the mailer.

Modified Paths:
--------------
    trunk/base/portmgr/PortIndex2MySQL.tcl

Modified: trunk/base/portmgr/PortIndex2MySQL.tcl
===================================================================
--- trunk/base/portmgr/PortIndex2MySQL.tcl	2007-10-05 19:41:37 UTC (rev 29692)
+++ trunk/base/portmgr/PortIndex2MySQL.tcl	2007-10-05 20:10:00 UTC (rev 29693)
@@ -67,7 +67,7 @@
 set runlog "/tmp/portsdb.log"
 set runlog_fd [open $runlog w+]
 set lockfile "/tmp/portsdb.lock"
-set mailprog "/usr/bin/mail"
+set mailprog "/usr/sbin/sendmail"
 set DATE [clock format [clock seconds] -format "%A %Y-%m-%d at %T"]
 set subject "PortIndex2MySQL run failure on $DATE"
 set SPAM_LOVERS macports-dev at lists.macosforge.org
@@ -88,7 +88,7 @@
     if {$exit_status} {
         global subject SPAM_LOVERS mailprog
         seek $runlog_fd 0 start
-        exec -- $mailprog -s $subject $SPAM_LOVERS <@ $runlog_fd
+        exec -- $mailprog $SPAM_LOVERS <@ $runlog_fd
     }
     cleanup runlog
     exit $exit_status
@@ -130,6 +130,9 @@
 }
 
 
+# We first initialize the runlog with a proper mail subject:
+puts $runlog_fd "Subject: $subject"
+
 # Check if there are any stray sibling jobs before moving on, bail in such case.
 if {[file exists $lockfile]} {
     ui_error "PortIndex2MySQL lock file found, is another job running?"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071005/ca8959ee/attachment.html


More information about the macports-changes mailing list