[51816] branches/images-and-archives/base/src/registry1.0/registry.tcl

blb at macports.org blb at macports.org
Wed Jun 3 22:19:35 PDT 2009


Revision: 51816
          http://trac.macports.org/changeset/51816
Author:   blb at macports.org
Date:     2009-06-03 22:19:35 -0700 (Wed, 03 Jun 2009)
Log Message:
-----------
Merge r51782 from trunk: simplify setting of attributes on directories created during activate

Modified Paths:
--------------
    branches/images-and-archives/base/src/registry1.0/registry.tcl

Modified: branches/images-and-archives/base/src/registry1.0/registry.tcl
===================================================================
--- branches/images-and-archives/base/src/registry1.0/registry.tcl	2009-06-04 05:16:54 UTC (rev 51815)
+++ branches/images-and-archives/base/src/registry1.0/registry.tcl	2009-06-04 05:19:35 UTC (rev 51816)
@@ -599,18 +599,10 @@
 		# Don't do anything if the directory already exists.
 		if { ![file isdirectory $dstfile] } {
 			file mkdir $dstfile
-	
 			# fix attributes on the directory.
-			set attributes [file attributes $srcfile]
-			for {set i 0} {$i < [llength $attributes]} {incr i} {
-				set opt [lindex $attributes $i]
-				incr i
-				set arg [lindex $attributes $i]
-				file attributes $dstfile $opt $arg
-			}
-	
+			eval file attributes {$dstfile} [file attributes $srcfile]
 			# set mtime on installed element
-			exec touch -r $srcfile $dstfile
+			file mtime $dstfile [file mtime $srcfile]
 		}
 	} else {
 		file rename $srcfile $dstfile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090603/d2ed868c/attachment.html>


More information about the macports-changes mailing list