[60773] branches/release_1_8

jmr at macports.org jmr at macports.org
Mon Nov 23 01:43:58 PST 2009


Revision: 60773
          http://trac.macports.org/changeset/60773
Author:   jmr at macports.org
Date:     2009-11-23 01:43:55 -0800 (Mon, 23 Nov 2009)
Log Message:
-----------
merge r59318 from trunk:
 avoid calling realpath for nonexistent files (#22001)

Revision Links:
--------------
    http://trac.macports.org/changeset/59318

Modified Paths:
--------------
    branches/release_1_8/base/src/registry1.0/portuninstall.tcl

Property Changed:
----------------
    branches/release_1_8/
    branches/release_1_8/base/


Property changes on: branches/release_1_8
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:55268,55279,55281,55285,55317,55385,55417,55591,55594,55679,55767,55793,56147,56160,56162,56435,56448,57026,57255,57436,57441,57784,57801,57871,57974,58445,59585,60259-60260
   + /trunk:55268,55279,55281,55285,55317,55385,55417,55591,55594,55679,55767,55793,56147,56160,56162,56435,56448,57026,57255,57436,57441,57784,57801,57871,57974,58445,59318,59585,60259-60260


Property changes on: branches/release_1_8/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:55268,55279,55281,55285,55317,55385,55417,55591,55594,55679,55767,55793,55825,56147,56160,56162,56435,56448,56472-56474,56666,56889,57026,57048,57055,57131,57255,57436,57441,57784,57801,57820,57871,57974,57979,57982,58093,58445,59585,60259-60260
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:55268,55279,55281,55285,55317,55385,55417,55591,55594,55679,55767,55793,55825,56147,56160,56162,56435,56448,56472-56474,56666,56889,57026,57048,57055,57131,57255,57436,57441,57784,57801,57820,57871,57974,57979,57982,58093,58445,59318,59585,60259-60260
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/release_1_8/base/src/registry1.0/portuninstall.tcl
===================================================================
--- branches/release_1_8/base/src/registry1.0/portuninstall.tcl	2009-11-23 07:54:11 UTC (rev 60772)
+++ branches/release_1_8/base/src/registry1.0/portuninstall.tcl	2009-11-23 09:43:55 UTC (rev 60773)
@@ -188,18 +188,21 @@
 					}
 				}
 			}
-			# Normalize the file path to avoid removing the intermediate
-			# symlinks (remove the empty directories instead)
-			set theFile [file normalize [lindex $f 0]]
-			lappend files $theFile
+			
+			if { [file exists $f] || (![catch {file type $f}] && [file type $f] == "link") } {
+			    # Normalize the file path to avoid removing the intermediate
+			    # symlinks (remove the empty directories instead)
+			    set theFile [file normalize [lindex $f 0]]
+			    lappend files $theFile
 
-			# Split out the filename's subpaths and add them to the
-			# list as well. The realpath call is necessary because file normalize
-			# does not resolve symlinks on OS X < 10.6
-			set directory [realpath [file dirname $theFile]]
-			while { [lsearch -exact $files $directory] == -1 } { 
-				lappend files $directory
-				set directory [file dirname $directory]
+			    # Split out the filename's subpaths and add them to the
+			    # list as well. The realpath call is necessary because file normalize
+			    # does not resolve symlinks on OS X < 10.6
+			    set directory [realpath [file dirname $theFile]]
+			    while { [lsearch -exact $files $directory] == -1 } { 
+				    lappend files $directory
+				    set directory [file dirname $directory]
+			    }
 			}
 		}
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091123/7b30ac22/attachment.html>


More information about the macports-changes mailing list