[35211] trunk/base/portmgr/jobs/PortIndex2MySQL.tcl

wsiegrist at apple.com wsiegrist at apple.com
Thu Mar 20 17:35:37 PDT 2008


Revision: 35211
          http://trac.macosforge.org/projects/macports/changeset/35211
Author:   wsiegrist at apple.com
Date:     2008-03-20 17:35:36 -0700 (Thu, 20 Mar 2008)

Log Message:
-----------
Use proper mail headers. Also cleaned up some variable case and layout weirdness

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

Modified: trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
===================================================================
--- trunk/base/portmgr/jobs/PortIndex2MySQL.tcl	2008-03-20 21:46:46 UTC (rev 35210)
+++ trunk/base/portmgr/jobs/PortIndex2MySQL.tcl	2008-03-21 00:35:36 UTC (rev 35211)
@@ -65,10 +65,16 @@
 set lockfile "/tmp/portsdb.lock"
 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
 
+set SUBJECT "PortIndex2MySQL run failure on $DATE"
+set FROM macports-mgr at lists.macosforge.org
+set HEADERS "To: $SPAM_LOVERS\r\nFrom: $FROM\r\nSubject: $SUBJECT\r\n\r\n"
 
+# We first initialize the runlog with proper mail headers
+puts $runlog_fd $HEADERS
+
 # House keeping on exit.
 proc cleanup {args} {
     foreach file_to_clean $args {
@@ -91,10 +97,6 @@
     exit $exit_status
 }
 
-
-# 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]} {
     puts $runlog_fd "PortIndex2MySQL lock file found, is another job running?" 

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


More information about the macports-changes mailing list