Changeset 27510


Ignore:
Timestamp:
Aug 6, 2007, 7:19:46 AM (13 years ago)
Author:
jmpp@…
Message:

Comments++ && Grammar++;

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/portmgr/packaging/PortIndex2MySQL.tcl

    r27415 r27510  
    3838
    3939
     40# Load macports1.0 so that we can use some of its procs and the portinfo array.
    4041catch {source \
    4142           [file join "@TCL_PACKAGE_DIR@" macports1.0 macports_fastload.tcl]}
    4243package require macports
    4344
    44 # Initialize the MacPorts system to find the sources.conf file, wherefrom we'll be
    45 # getting the PortIndex file that'll feed the database, and initialize the portinfo
    46 # array for each port.
     45# Initialize MacPorts to find the sources.conf file, wherefrom we'll
     46# get the PortIndex that'll feed the database.
    4747mportinit
     48
    4849
    4950# Procedure to catch the database password from a protected file.
     
    6162}
    6263
    63 
    6464# Needed escaping for some strings output as sql statements.
    6565proc sql_escape {str} {
     
    111111puts $sqlfile_fd "CREATE TABLE platforms (portfile VARCHAR(255), platform VARCHAR(255))"
    112112
     113
     114# Load every port in the index through a search matching everything.
    113115if {[catch {set ports [mportsearch ".+"]} errstr]} {
    114116        ui_error "port search failed: $errstr"
     
    116118}
    117119
     120# Iterate over each matching port, extracting its information from the
     121# portinfo array.
    118122foreach {name array} $ports {
    119123
     
    213217
    214218
    215 # Pipe the contents of the generated sql file to the database command:
     219# Pipe the contents of the generated sql file to the database command,
     220# reading from the file descriptor for the raw sql file to assure completeness.
    216221if {[catch {seek $sqlfile_fd 0 start} errstr]} {
    217222    ui_error "${::errorCode}: $errstr"
Note: See TracChangeset for help on using the changeset viewer.