[58093] trunk/base/src/port1.0/portinstall.tcl
blb at macports.org
blb at macports.org
Mon Sep 21 21:14:32 PDT 2009
Revision: 58093
http://trac.macports.org/changeset/58093
Author: blb at macports.org
Date: 2009-09-21 21:14:28 -0700 (Mon, 21 Sep 2009)
Log Message:
-----------
port1.0/portinstall.tcl - fix attribute-setting issue for non-root installs on 10.6; see thread at
<http://lists.macosforge.org/pipermail/macports-users/2009-August/016346.html>
Modified Paths:
--------------
trunk/base/src/port1.0/portinstall.tcl
Modified: trunk/base/src/port1.0/portinstall.tcl
===================================================================
--- trunk/base/src/port1.0/portinstall.tcl 2009-09-22 02:53:43 UTC (rev 58092)
+++ trunk/base/src/port1.0/portinstall.tcl 2009-09-22 04:14:28 UTC (rev 58093)
@@ -78,7 +78,15 @@
# if the file is a symlink, do not try to set file attributes
if {[file type $src_element] != "link"} {
- eval file attributes {$dst_element} [file attributes $src_element]
+ # tclsh on 10.6 doesn't like the combination of 0444 perm and
+ # '-creator {}' (which is returned from 'file attributes <file>'; so
+ # instead just set the attributes which are needed
+ set wantedattrs {owner group permissions}
+ set file_attr_cmd {file attributes $dst_element}
+ foreach oneattr $wantedattrs {
+ set file_attr_cmd "$file_attr_cmd -$oneattr \[file attributes \$src_element -$oneattr\]"
+ }
+ eval $file_attr_cmd
# set mtime on installed element
file mtime $dst_element [file mtime $src_element]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090921/76115411/attachment.html>
More information about the macports-changes
mailing list