[67792] trunk/base/src/package1.0/portunarchive.tcl

jmr at macports.org jmr at macports.org
Tue May 18 08:23:53 PDT 2010


Revision: 67792
          http://trac.macports.org/changeset/67792
Author:   jmr at macports.org
Date:     2010-05-18 08:23:49 -0700 (Tue, 18 May 2010)
Log Message:
-----------
remove conversion of statefile strings from really old archives, and fix an fd leak in unarchive

Modified Paths:
--------------
    trunk/base/src/package1.0/portunarchive.tcl

Modified: trunk/base/src/package1.0/portunarchive.tcl
===================================================================
--- trunk/base/src/package1.0/portunarchive.tcl	2010-05-18 15:05:33 UTC (rev 67791)
+++ trunk/base/src/package1.0/portunarchive.tcl	2010-05-18 15:23:49 UTC (rev 67792)
@@ -289,25 +289,14 @@
     global UI_PREFIX target_state_fd unarchive.file name workpath destpath
 
     # Reset state file with archive version
+    close $target_state_fd
     set statefile [file join $workpath .macports.${name}.state]
     file copy -force [file join $destpath "+STATE"] $statefile
     file mtime $statefile [clock seconds]
 
-# Hack to temporarily move com.apple.* strings in statefiles extracted from old archives
-# to the org.macports.* namespace. "temporarily" because old archives will still have a
-# +STATE file with the old strings in it, as we only update them on the unpacked statefile.
-    set fd_new_sf [open $statefile r]
-    set fd_tmp [open ${statefile}.tmp w+]
-    while {[gets $fd_new_sf line] >= 0} {
-    puts $fd_tmp "[regsub com.apple $line org.macports]"
-    }
-    close $fd_new_sf
-    close $fd_tmp
-    file rename -force ${statefile}.tmp $statefile
-
     # Update the state from unpacked archive version
     set target_state_fd [open_statefile]
-    
+
     # Cleanup all control files when finished
     set control_files [glob -nocomplain -types f [file join $destpath +*]]
     foreach file $control_files {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100518/afaaa630/attachment.html>


More information about the macports-changes mailing list