[52154] trunk/base/src/registry1.0/portuninstall.tcl

jmr at macports.org jmr at macports.org
Thu Jun 11 05:43:30 PDT 2009


Revision: 52154
          http://trac.macports.org/changeset/52154
Author:   jmr at macports.org
Date:     2009-06-11 05:43:30 -0700 (Thu, 11 Jun 2009)
Log Message:
-----------
make uninstall respect the dry-run option (#19908)

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

Modified: trunk/base/src/registry1.0/portuninstall.tcl
===================================================================
--- trunk/base/src/registry1.0/portuninstall.tcl	2009-06-11 11:53:46 UTC (rev 52153)
+++ trunk/base/src/registry1.0/portuninstall.tcl	2009-06-11 12:43:30 UTC (rev 52154)
@@ -124,10 +124,18 @@
 
 	set installtype [registry::property_retrieve $ref installtype]
 	if { $installtype == "image" && [registry::property_retrieve $ref active] == 1} {
-		#return -code error [msgcat::mc "Registry Error: ${portname} ${version}_${revision}${variants} is active."]
-		portimage::deactivate $portname ${version}_${revision}${variants} $optionslist
+		if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
+			ui_msg "For $portname @${version}_${revision}${variants}: skipping deactivate (dry run)"
+		} else {
+			portimage::deactivate $portname ${version}_${revision}${variants} $optionslist
+		}
 	}
 
+	if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
+		ui_msg "For $portname @${version}_${revision}${variants}: skipping uninstall (dry run)"
+		return 0
+	}
+	
 	ui_msg "$UI_PREFIX [format [msgcat::mc "Uninstalling %s @%s_%s%s"] $portname $version $revision $variants]"
 
 	# Look to see if the port has registered an uninstall procedure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090611/32affca5/attachment.html>


More information about the macports-changes mailing list