[90004] trunk/base/src

jmr at macports.org jmr at macports.org
Sun Feb 19 09:33:08 PST 2012


Revision: 90004
          http://trac.macports.org/changeset/90004
Author:   jmr at macports.org
Date:     2012-02-19 09:33:07 -0800 (Sun, 19 Feb 2012)
Log Message:
-----------
copy xcode prefs instead of linking

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

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2012-02-19 17:25:33 UTC (rev 90003)
+++ trunk/base/src/macports1.0/macports.tcl	2012-02-19 17:33:07 UTC (rev 90004)
@@ -1018,7 +1018,7 @@
     }
 
     if {$os_major >= 11 && $os_platform == "darwin" && [vercmp $xcodeversion 4.3] >= 0} {
-        macports::link_xcode_plist $env(HOME)
+        macports::copy_xcode_plist $env(HOME)
     }
 
     # Set the default umask
@@ -1153,18 +1153,16 @@
 }
 
 # link plist for xcode 4.3's benefit
-proc macports::link_xcode_plist {target_homedir} {
+proc macports::copy_xcode_plist {target_homedir} {
     global macports::user_home
     set user_plist "${user_home}/Library/Preferences/com.apple.dt.Xcode.plist"
-    set plist_link "${target_homedir}/Library/Preferences/com.apple.dt.Xcode.plist"
-    if {[file isfile $user_plist] && ([catch {file type $plist_link} filetype]
-        || $filetype != "link" || [file link $plist_link] != $user_plist)} {
+    set target_dir "${target_homedir}/Library/Preferences"
+    if {[file isfile $user_plist]} {
         if {[catch {
                 file mkdir "${target_homedir}/Library/Preferences"
-                file delete -force $plist_link
-                file link -symbolic $plist_link $user_plist
+                file copy -force $user_plist $target_dir
                 } result]} {
-            ui_debug "Failed to link com.apple.dt.Xcode.plist: $result"
+            ui_debug "Failed to copy com.apple.dt.Xcode.plist: $result"
         }
     }
 }
@@ -1228,7 +1226,7 @@
     $workername alias realpath realpath
     $workername alias _mportsearchpath _mportsearchpath
     $workername alias _portnameactive _portnameactive
-    $workername alias _link_xcode_plist macports::link_xcode_plist
+    $workername alias _copy_xcode_plist macports::copy_xcode_plist
 
     # New Registry/Receipts stuff
     $workername alias registry_new registry::new_entry

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2012-02-19 17:25:33 UTC (rev 90003)
+++ trunk/base/src/port1.0/portutil.tcl	2012-02-19 17:33:07 UTC (rev 90004)
@@ -1641,7 +1641,7 @@
             file mkdir "${workpath}/.home"
             global xcodeversion
             if {[vercmp $xcodeversion 4.3] >= 0} {
-                _link_xcode_plist "${workpath}/.home"
+                _copy_xcode_plist "${workpath}/.home"
             }
             chownAsRoot $subbuildpath
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120219/73f5ef99/attachment.html>


More information about the macports-changes mailing list