[105050] users/cal/base-rewrite/src/macports2.0/private.tcl

cal at macports.org cal at macports.org
Mon Apr 8 09:56:27 PDT 2013


Revision: 105050
          https://trac.macports.org/changeset/105050
Author:   cal at macports.org
Date:     2013-04-08 09:56:27 -0700 (Mon, 08 Apr 2013)
Log Message:
-----------
private.tcl: fix various obvious errors

Modified Paths:
--------------
    users/cal/base-rewrite/src/macports2.0/private.tcl

Modified: users/cal/base-rewrite/src/macports2.0/private.tcl
===================================================================
--- users/cal/base-rewrite/src/macports2.0/private.tcl	2013-04-08 16:55:49 UTC (rev 105049)
+++ users/cal/base-rewrite/src/macports2.0/private.tcl	2013-04-08 16:56:27 UTC (rev 105050)
@@ -37,6 +37,7 @@
 package provide macports::private 2.0
 
 package require macports::autoconf 2.0
+package require macports::priority 2.0
 
 ##
 # \warning
@@ -103,6 +104,9 @@
     ##
     # Locate and load any configuration files.
     proc init_configuration {} {
+        variable bootstrap_options
+        variable user_options
+
         # Run configuration files in conf_path and build_user_dir
         set global_conf_file "[macports::autoconf conf_path]/macports.conf"
         set user_conf_file "[macports::option build_user_dir]/macports.conf"
@@ -110,7 +114,7 @@
         load_config_file $bootstrap_options $user_conf_file
 
         # Load the user configuration file, if it exists
-        load_conf_file $user_options "[macports::option build_user_dir]/user.conf"
+        load_config_file $user_options "[macports::option build_user_dir]/user.conf"
 
         # Load the sources.conf and thus the available port trees
         load_sources
@@ -173,7 +177,7 @@
         }
 
         # Load sources_conf
-        if {catch {set fd [open [macports::option sources_conf] r]} result} {
+        if {[catch {set fd [open [macports::option sources_conf] r]} result]} {
             macports::msg $macports::priority::error \
                 "Can't open sources_conf %s: %s." \
                 [macports::option sources_conf] $result
@@ -218,7 +222,7 @@
         if {[llength $sources] == 0} {
             macports::msg $macports::priority::error \
                 "No sources are defined in %s. Cannot continue without a ports tree." \
-                [macports::options sources_conf]
+                [macports::option sources_conf]
             error "no port sources available"
         }
 
@@ -228,7 +232,7 @@
         if {$default_source == {}} {
             macports::msg $macports::priority::warning \
                 "No default port source specified in %s, using last source as default." \
-                [macports::options sources_conf]
+                [macports::option sources_conf]
             set default_source [lindex $sources end]
         }
     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130408/b0628fd5/attachment-0001.html>


More information about the macports-changes mailing list