[51656] branches/images-and-archives/base/src/registry1.0/portuninstall.tcl

blb at macports.org blb at macports.org
Sat May 30 00:02:20 PDT 2009


Revision: 51656
          http://trac.macports.org/changeset/51656
Author:   blb at macports.org
Date:     2009-05-30 00:02:19 -0700 (Sat, 30 May 2009)
Log Message:
-----------
Remove a port's image dir on uninstall (ignore failure due to there being
more image files)

Modified Paths:
--------------
    branches/images-and-archives/base/src/registry1.0/portuninstall.tcl

Modified: branches/images-and-archives/base/src/registry1.0/portuninstall.tcl
===================================================================
--- branches/images-and-archives/base/src/registry1.0/portuninstall.tcl	2009-05-30 06:33:09 UTC (rev 51655)
+++ branches/images-and-archives/base/src/registry1.0/portuninstall.tcl	2009-05-30 07:02:19 UTC (rev 51656)
@@ -153,8 +153,12 @@
 	}
 
 	set macport_filename "${portname}-${epoch}-${version}_${revision}${variants}.${macports::os_platform}.${macports::os_arch}.macport"
-	set macport_file [file join ${macports::portimagefilepath} $portname $macport_filename]
+	set portimagedir [file join ${macports::portimagefilepath} $portname]
+	set macport_file [file join $portimagedir $macport_filename]
 	file delete $macport_file
+	# Try to delete the port's image dir; will fail if there are more image
+	# files so just ignore the failure
+	catch {file delete $portimagedir} ignorederr
 	ui_info "$UI_PREFIX [format [msgcat::mc "Uninstall is removing %s from the port registry."] $portname]"
 	registry::delete_entry $ref
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090530/7e67b046/attachment.html>


More information about the macports-changes mailing list