[35042] trunk/base/src/registry1.0/portuninstall.tcl
eridius at macports.org
eridius at macports.org
Sat Mar 15 07:30:34 PDT 2008
Revision: 35042
http://trac.macosforge.org/projects/macports/changeset/35042
Author: eridius at macports.org
Date: 2008-03-15 07:30:32 -0700 (Sat, 15 Mar 2008)
Log Message:
-----------
Fix recursive uninstall for case where multiple branches of dep tree contain the same port
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-03-15 13:57:52 UTC (rev 35041)
+++ trunk/base/src/registry1.0/portuninstall.tcl 2008-03-15 14:30:32 UTC (rev 35042)
@@ -91,7 +91,7 @@
# xxx: Should look at making registry::installed return 0 or
# something instead of erroring.
if { ![catch {set installed [registry::installed $depport]} res] } {
- if { [llength [registry::installed $depport]] > 0 } {
+ if { [llength installed] > 0 } {
lappend dl $depport
}
}
@@ -100,7 +100,13 @@
if { [llength $dl] > 0 } {
if {[info exists options(ports_uninstall_recursive)] && $options(ports_uninstall_recursive) eq "yes"} {
foreach depport $dl {
- portuninstall::uninstall $depport "" [array get options]
+ # make sure it's still installed, since a previous dep uninstall may have removed it
+ # does registry::installed still error? A cursory look at the code says no, but above says yes
+ if { ![catch {set installed [registry::installed $depport]} res] } {
+ if { [llength installed] > 0 } {
+ portuninstall::uninstall $depport "" [array get options]
+ }
+ }
}
} 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]"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080315/d0ea8886/attachment-0001.html
More information about the macports-changes
mailing list