[25532] branches/dp2mp-move/base/src/macports1.0/macports.tcl

source_changes at macosforge.org source_changes at macosforge.org
Thu May 24 00:51:21 PDT 2007


Revision: 25532
          http://trac.macosforge.org/projects/macports/changeset/25532
Author:   jmpp at macports.org
Date:     2007-05-24 00:51:21 -0700 (Thu, 24 May 2007)

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

Remove some error catching in mportinit and mportsync that was removed from trunk and I somehow missed,
along with a stray comment I'd put in long ago. Also insert a UTF-8 encoding enforcement for the sources.conf
file that was set on trunk and I also missed, somehow...

Modified Paths:
--------------
    branches/dp2mp-move/base/src/macports1.0/macports.tcl

Modified: branches/dp2mp-move/base/src/macports1.0/macports.tcl
===================================================================
--- branches/dp2mp-move/base/src/macports1.0/macports.tcl	2007-05-24 07:40:38 UTC (rev 25531)
+++ branches/dp2mp-move/base/src/macports1.0/macports.tcl	2007-05-24 07:51:21 UTC (rev 25532)
@@ -342,9 +342,8 @@
     if {![info exists sources_conf]} {
         return -code error "sources_conf must be set in ${macports_conf_path}/macports.conf or in your ${macports_user_dir}/macports.conf file"
     }
-    if {[catch {set fd [open $sources_conf r]} result]} {
-        return -code error "$result"
-    }
+    set fd [open $sources_conf r]
+    fconfigure $fd -encoding utf-8
     while {[gets $fd line] >= 0} {
         set line [string trimright $line]
 	if {![regexp {^\s*#|^$} $line]} {
@@ -514,7 +513,6 @@
 		global macports::rsync_server
 	}
 	if {![info exists rsync_dir]} {
-	    # Still thinking about this path.
 		set macports::rsync_dir release/base/
 		global macports::rsync_dir
 	}
@@ -1250,13 +1248,14 @@
 	    {^rsync$} {
 		# Where to, boss?
 		set destdir [file dirname [macports::getindex $source]]
-		if {[catch {file mkdir $destdir} result]} {
-		    return -code error $result
-		}
+
+		file mkdir $destdir
+		
 		# Keep rsync happy with a trailing slash
 		if {[string index $source end] != "/"} {
 		    set source "${source}/"
 		}
+
 		# Do rsync fetch
 		set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options} ${source} ${destdir}"
 		ui_debug $rsync_commandline

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070524/2b9e0785/attachment.html


More information about the macports-changes mailing list