[31415] trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
jmpp at macports.org
jmpp at macports.org
Thu Nov 22 10:55:13 PST 2007
Revision: 31415
http://trac.macosforge.org/projects/macports/changeset/31415
Author: jmpp at macports.org
Date: 2007-11-22 10:55:12 -0800 (Thu, 22 Nov 2007)
Log Message:
-----------
The primary key should not be incremented monolithically, I misunderstood its intent at first.
Modified Paths:
--------------
trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
Modified: trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
===================================================================
--- trunk/base/portmgr/jobs/PortIndex2MySQL.tcl 2007-11-22 18:32:27 UTC (rev 31414)
+++ trunk/base/portmgr/jobs/PortIndex2MySQL.tcl 2007-11-22 18:55:12 UTC (rev 31415)
@@ -5,7 +5,7 @@
# Kevin Van Vechten | kevin at opendarwin.org
# 3-Oct-2002
# Juan Manuel Palacios | jmpp at macports.org
-# 30-Jul-2007
+# 22-Nov-2007
# $Id$
#
# Copyright (c) 2007 Juan Manuel Palacios, The MacPorts Project.
@@ -37,6 +37,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
+
#####
# The PortIndex2MySQL script populates a database with key information extracted
# from the Portfiles in the ports tree pointed to by the sources.conf file in a
@@ -185,7 +186,7 @@
# Database abstraction variables:
set sqlfile "/tmp/portsdb.sql"
set dbcmd [macports::findBinary mysql5]
-set dbhost 127.0.0.1
+set dbhost localhost
set dbuser macports
set passwdfile "./password_file"
set dbpasswd [getpasswd $passwdfile]
@@ -301,14 +302,14 @@
foreach category $categories {
set category [sql_escape $category]
puts $sqlfile_fd "INSERT INTO categories VALUES ('$portname', '$category', $primary);"
- incr primary
+ set primary 0
}
set primary 1
foreach maintainer $maintainers {
set maintainer [sql_escape $maintainer]
puts $sqlfile_fd "INSERT INTO maintainers VALUES ('$portname', '$maintainer', $primary);"
- incr primary
+ set primary 0
}
foreach build_dep $depends_build {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071122/bc0f7588/attachment.html
More information about the macports-changes
mailing list