[36747] trunk/base/src/registry1.0/portuninstall.tcl
jmr at macports.org
jmr at macports.org
Tue May 13 21:53:20 PDT 2008
Revision: 36747
http://trac.macosforge.org/projects/macports/changeset/36747
Author: jmr at macports.org
Date: 2008-05-13 21:53:20 -0700 (Tue, 13 May 2008)
Log Message:
-----------
uninstall: allow unforced removal of a port with dependents, iff it is
inactive and there is at least one other version of the same port installed.
Modified Paths:
--------------
trunk/base/src/registry1.0/portuninstall.tcl
Modified: trunk/base/src/registry1.0/portuninstall.tcl
===================================================================
--- trunk/base/src/registry1.0/portuninstall.tcl 2008-05-14 04:02:18 UTC (rev 36746)
+++ trunk/base/src/registry1.0/portuninstall.tcl 2008-05-14 04:53:20 UTC (rev 36747)
@@ -62,6 +62,7 @@
set version [lindex [lindex $ilist 0] 1]
set revision [lindex [lindex $ilist 0] 2]
set variants [lindex [lindex $ilist 0] 3]
+ set active [lindex [lindex $ilist 0] 4]
}
# determine if it's the only installed port with that name or not.
@@ -109,15 +110,18 @@
}
}
} else {
- 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."
- }
+ # will need to change this when we get version/variant dependencies
+ if {$nb_versions_installed == 1 || $active == 1} {
+ 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/20080513/80444751/attachment.html
More information about the macports-changes
mailing list