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

jmpp at macports.org jmpp at macports.org
Sat Nov 24 10:39:54 PST 2007


Revision: 31455
          http://trac.macosforge.org/projects/macports/changeset/31455
Author:   jmpp at macports.org
Date:     2007-11-24 10:39:52 -0800 (Sat, 24 Nov 2007)

Log Message:
-----------
Standardize db variables naming with those found on the trunk/www/includes/common.inc file.

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

Modified: trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
===================================================================
--- trunk/base/portmgr/jobs/PortIndex2MySQL.tcl	2007-11-24 14:45:58 UTC (rev 31454)
+++ trunk/base/portmgr/jobs/PortIndex2MySQL.tcl	2007-11-24 18:39:52 UTC (rev 31455)
@@ -184,13 +184,14 @@
 
 # Database abstraction variables:
 set sqlfile "/tmp/portsdb.sql"
-set dbcmd [macports::findBinary mysql5]
-set dbhost localhost
-set dbuser macports
+set portsdb_host localhost
+set portsdb_name macports
+set portsdb_user macports
 set passwdfile "/opt/local/share/macports/resources/portmgr/password_file"
-set dbpasswd [getpasswd $passwdfile]
-set dbname macports
+set portsdb_passwd [getpasswd $passwdfile]
+set portsdb_cmd [macports::findBinary mysql5]
 
+
 # Flat text file to which sql statements are written.
 if {[catch {open $sqlfile w+} sqlfile_fd]} {
     ui_error "${::errorCode}: $sqlfile_fd"
@@ -356,7 +357,7 @@
     cleanup sqlfile lockfile
     terminate 1
 }
-if {[catch {exec -- $dbcmd --host=$dbhost --user=$dbuser --password=$dbpasswd --database=$dbname <@ $sqlfile_fd} errstr]} {
+if {[catch {exec -- $portsdb_cmd --host=$portsdb_host --user=$portsdb_user --password=$portsdb_passwd --database=$portsdb_name <@ $sqlfile_fd} errstr]} {
     ui_error "${::errorCode}: $errstr"
     cleanup sqlfile lockfile
     terminate 1

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


More information about the macports-changes mailing list