[90084] trunk/base/src/macports1.0/macports.tcl

jmr at macports.org jmr at macports.org
Tue Feb 21 07:44:25 PST 2012


Revision: 90084
          http://trac.macports.org/changeset/90084
Author:   jmr at macports.org
Date:     2012-02-21 07:44:21 -0800 (Tue, 21 Feb 2012)
Log Message:
-----------
make xcode plist world readable after copying

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2012-02-21 15:30:47 UTC (rev 90083)
+++ trunk/base/src/macports1.0/macports.tcl	2012-02-21 15:44:21 UTC (rev 90084)
@@ -1185,24 +1185,20 @@
     set target_dir "${target_homedir}/Library/Preferences"
     if {[file isfile $user_plist]} {
         if {![file isdirectory "${target_dir}"]} {
-            ui_debug "Creating Library/Preferences in temporary home: ${target_dir}"
             if {[catch {file mkdir "${target_dir}"} result]} {
                 ui_warn "Failed to create Library/Preferences in temporary home directory: $result"
                 return
             }
         }
-        if {![file isfile "${target_dir}/com.apple.dt.Xcode.plist"] || [file mtime "${user_plist}"] >
-            [file mtime "${target_dir}/com.apple.dt.Xcode.plist"]} {
-            ui_debug "Copying $user_plist to temporary home directory ${target_dir}"
-            if {[catch {
-                file copy -force $user_plist $target_dir
-                if {[getuid] == 0} {
-                    ui_debug "Attempting to chown() com.apple.dt.Xcode.plist in temporary home"
-                    file attributes "${target_dir}/com.apple.dt.Xcode.plist" -owner $macportsuser
-                }
-            } result]} {
-                ui_warn "Failed to copy com.apple.dt.Xcode.plist to temporary home directory: $result"
+        ui_debug "Copying $user_plist to temporary home directory ${target_dir}"
+        if {[catch {
+            file copy -force $user_plist $target_dir
+            if {[getuid] == 0} {
+                file attributes "${target_dir}/com.apple.dt.Xcode.plist" -owner $macportsuser
             }
+            file attributes "${target_dir}/com.apple.dt.Xcode.plist" -permissions 644
+        } result]} {
+            ui_warn "Failed to copy com.apple.dt.Xcode.plist to temporary home directory: $result"
         }
     }
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120221/202e02ba/attachment.html>


More information about the macports-changes mailing list