[34977] trunk/base
eridius at macports.org
eridius at macports.org
Thu Mar 13 07:13:52 PDT 2008
Revision: 34977
http://trac.macosforge.org/projects/macports/changeset/34977
Author: eridius at macports.org
Date: 2008-03-13 07:13:51 -0700 (Thu, 13 Mar 2008)
Log Message:
-----------
Add new --recursive option to port uninstall to uninstall dependents (#14637)
Modified Paths:
--------------
trunk/base/ChangeLog
trunk/base/doc/port.1
trunk/base/src/registry1.0/portuninstall.tcl
Modified: trunk/base/ChangeLog
===================================================================
--- trunk/base/ChangeLog 2008-03-13 13:17:14 UTC (rev 34976)
+++ trunk/base/ChangeLog 2008-03-13 14:13:51 UTC (rev 34977)
@@ -5,6 +5,8 @@
Unreleased:
+ - port uninstall now takes --recursive to uninstall all dependents (#14637, eridius in r34977)
+
- New fetch.type git (#14232, eridius in r34875)
- fixed "port mdmg" getting block size wrong for the disk image (#13968, afb in r34844)
Modified: trunk/base/doc/port.1
===================================================================
--- trunk/base/doc/port.1 2008-03-13 13:17:14 UTC (rev 34976)
+++ trunk/base/doc/port.1 2008-03-13 14:13:51 UTC (rev 34977)
@@ -289,10 +289,14 @@
.Ar portname .
To uninstall all installed but inactive ports, use
.Fl u .
+To recursively uninstall all dependents of this port, use
+.Fl -recursive .
+.Pp
For example:
.Pp
.Dl "port uninstall vim"
.Dl "port -u uninstall"
+.Dl "port uninstall --recursive python24"
.Ss activate
Activate the installed
.Ar portname .
Modified: trunk/base/src/registry1.0/portuninstall.tcl
===================================================================
--- trunk/base/src/registry1.0/portuninstall.tcl 2008-03-13 13:17:14 UTC (rev 34976)
+++ trunk/base/src/registry1.0/portuninstall.tcl 2008-03-13 14:13:51 UTC (rev 34977)
@@ -98,14 +98,20 @@
}
# Now see if we need to error
if { [llength $dl] > 0 } {
- ui_msg "$UI_PREFIX [format [msgcat::mc "Unable to uninstall %s %s_%s%s, the following ports depend on it:"] $portname $version $revision $variants]"
- foreach depport $dl {
- ui_msg "$UI_PREFIX [format [msgcat::mc " %s"] $depport]"
- }
- if { [info exists uninstall.force] && [string equal ${uninstall.force} "yes"] } {
- ui_warn "Uninstall forced. Proceeding despite dependencies."
+ if {[info exists options(ports_uninstall_recursive)] && $options(ports_uninstall_recursive) eq "yes"} {
+ foreach depport $dl {
+ portuninstall::uninstall $depport "" [array get options]
+ }
} else {
- return -code error "Please uninstall the ports that depend on $portname first."
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Unable to uninstall %s %s_%s%s, the following ports depend on it:"] $portname $version $revision $variants]"
+ foreach depport $dl {
+ ui_msg "$UI_PREFIX [format [msgcat::mc " %s"] $depport]"
+ }
+ if { [info exists uninstall.force] && [string equal ${uninstall.force} "yes"] } {
+ ui_warn "Uninstall forced. Proceeding despite dependencies."
+ } else {
+ return -code error "Please uninstall the ports that depend on $portname first."
+ }
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080313/9eaba2ed/attachment.html
More information about the macports-changes
mailing list