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

source_changes at macosforge.org source_changes at macosforge.org
Tue Sep 25 22:07:00 PDT 2007


Revision: 29505
          http://trac.macosforge.org/projects/macports/changeset/29505
Author:   jmpp at macports.org
Date:     2007-09-25 22:07:00 -0700 (Tue, 25 Sep 2007)

Log Message:
-----------

 * Adapt to new macports1.0 UI API: global reference to ui_options in custom ui_channels proc is no longer needed;
 * In getpasswd proc: bring lockfile and lockfile_fd vars into scope so that we can properly clean the corresponding file should we need to;
 * In getpasswd proc: improve the error message for the missing password case.

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

Modified: trunk/base/portmgr/PortIndex2MySQL.tcl
===================================================================
--- trunk/base/portmgr/PortIndex2MySQL.tcl	2007-09-26 00:53:56 UTC (rev 29504)
+++ trunk/base/portmgr/PortIndex2MySQL.tcl	2007-09-26 05:07:00 UTC (rev 29505)
@@ -96,7 +96,7 @@
 
 # UI instantiation to route information/error messages wherever we want.
 proc ui_channels {priority} {
-    global ui_options runlog_fd
+    global runlog_fd
     switch $priority {
         debug {
             if {[macports::ui_isset ports_debug]} {
@@ -162,13 +162,15 @@
 # Procedure to catch the database password from a protected file.
 proc getpasswd {passwdfile} {
     if {[catch {open $passwdfile r} passwdfile_fd]} {
+        global lockfile lockfile_fd
         ui_error "${::errorCode}: $passwdfile_fd"
         cleanup lockfile
         terminate 1
     }
     if {[gets $passwdfile_fd passwd] <= 0} {
+        global lockfile lockfile_fd
         close $passwdfile_fd
-        ui_error "No password found in $passwdfile!"
+        ui_error "No password found in password file $passwdfile!"
         cleanup lockfile
         terminate 1
     }

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


More information about the macports-changes mailing list