[51782] trunk/base/src/registry1.0/portimage.tcl
jmr at macports.org
jmr at macports.org
Wed Jun 3 00:08:59 PDT 2009
Revision: 51782
http://trac.macports.org/changeset/51782
Author: jmr at macports.org
Date: 2009-06-03 00:08:58 -0700 (Wed, 03 Jun 2009)
Log Message:
-----------
simplify setting of attributes on directories created during activate
Modified Paths:
--------------
trunk/base/src/registry1.0/portimage.tcl
Modified: trunk/base/src/registry1.0/portimage.tcl
===================================================================
--- trunk/base/src/registry1.0/portimage.tcl 2009-06-03 06:54:18 UTC (rev 51781)
+++ trunk/base/src/registry1.0/portimage.tcl 2009-06-03 07:08:58 UTC (rev 51782)
@@ -280,18 +280,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]
}
} elseif { [file type $srcfile] == "link" } {
file copy -force $srcfile $dstfile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090603/72bd77aa/attachment.html>
More information about the macports-changes
mailing list