[26057] branches/dp2mp-move/base/src

source_changes at macosforge.org source_changes at macosforge.org
Sun Jun 10 23:11:45 PDT 2007


Revision: 26057
          http://trac.macosforge.org/projects/macports/changeset/26057
Author:   jmpp at macports.org
Date:     2007-06-10 23:11:45 -0700 (Sun, 10 Jun 2007)

Log Message:
-----------
Merging Eridius' r25975: Fix the encoding issues. No more fconfigure, instead just set the system encoding to utf-8 in mportinit.

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

Modified: branches/dp2mp-move/base/src/macports1.0/macports.tcl
===================================================================
--- branches/dp2mp-move/base/src/macports1.0/macports.tcl	2007-06-11 05:50:18 UTC (rev 26056)
+++ branches/dp2mp-move/base/src/macports1.0/macports.tcl	2007-06-11 06:11:45 UTC (rev 26057)
@@ -279,6 +279,9 @@
    	global macports::xcodebuildcmd
    	global macports::xcodeversion
 
+        # Set the system encoding to utf-8
+        encoding system utf-8
+
         # Ensure that the macports user directory exists if HOME is defined
         if {[info exists env(HOME)]} {
 	    set macports::macports_user_dir [file normalize $macports::autoconf::macports_user_dir]
@@ -310,7 +313,6 @@
 		if [file exists $file] {
 			set portconf $file
 			set fd [open $file r]
-		        fconfigure $fd -encoding utf-8
 			while {[gets $fd line] >= 0} {
 				if {[regexp {^(\w+)([ \t]+(.*))?$} $line match option ignore val] == 1} {
 					if {[lsearch $bootstrap_options $option] >= 0} {
@@ -328,7 +330,6 @@
         set per_user "${macports_user_dir}/user.conf"
 	if [file exists $per_user] {
 		set fd [open $per_user r]
-	        fconfigure $fd -encoding utf-8
 		while {[gets $fd line] >= 0} {
 			if {[regexp {^(\w+)([ \t]+(.*))?$} $line match option ignore val] == 1} {
 				if {[lsearch $user_options $option] >= 0} {
@@ -343,7 +344,6 @@
         return -code error "sources_conf must be set in ${macports_conf_path}/macports.conf or in your ${macports_user_dir}/macports.conf file"
     }
     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]} {
@@ -371,7 +371,6 @@
 	if {[info exists variants_conf]} {
 		if {[file exist $variants_conf]} {
 		        set fd [open $variants_conf r]
-		        fconfigure $fd -encoding utf-8
 			while {[gets $fd line] >= 0} {
 				set line [string trimright $line]
 				if {![regexp {^[\ \t]*#.*$|^$} $line]} {
@@ -1295,7 +1294,6 @@
 			if {[catch {set fd [open [macports::getindex $source] r]} result]} {
 				ui_warn "Can't open index file for source: $source"
 			} else {
-			        fconfigure $fd -encoding utf-8
 				incr found 1
 				while {[gets $fd line] >= 0} {
 					array unset portinfo

Modified: branches/dp2mp-move/base/src/port/portindex.tcl
===================================================================
--- branches/dp2mp-move/base/src/port/portindex.tcl	2007-06-11 05:50:18 UTC (rev 26056)
+++ branches/dp2mp-move/base/src/port/portindex.tcl	2007-06-11 06:11:45 UTC (rev 26057)
@@ -202,7 +202,6 @@
 
 puts "Creating software index in $outdir"
 set fd [open [file join $outdir PortIndex] w]
-fconfigure $fd -encoding utf-8
 mporttraverse pindex $directory
 close $fd
 puts "\nTotal number of ports parsed:\t$stats(total)\

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


More information about the macports-changes mailing list