[108016] trunk/base/src/port/port.tcl
cal at macports.org
cal at macports.org
Wed Jul 10 13:00:19 PDT 2013
Revision: 108016
https://trac.macports.org/changeset/108016
Author: cal at macports.org
Date: 2013-07-10 13:00:19 -0700 (Wed, 10 Jul 2013)
Log Message:
-----------
port: print a warning when trying to uninstall a port macports knows nothing about
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2013-07-10 19:51:13 UTC (rev 108015)
+++ trunk/base/src/port/port.tcl 2013-07-10 20:00:19 UTC (rev 108016)
@@ -3066,7 +3066,15 @@
foreachport $portlist {
if {![registry::entry_exists_for_name $portname]} {
- ui_info "$portname is already uninstalled"
+ # if the code path arrives here the port either isn't installed, or
+ # it doesn't exist at all. We can't be sure, but we can check the
+ # portindex whether a port by that name exists (in which case not
+ # uninstalling it is probably no problem). If there is no port by
+ # that name, alert the user in case of typos.
+ ui_info "$portname is not installed"
+ if {[catch {set res [mportlookup $portname]} result] || [llength $res] == 0} {
+ ui_warn "no such port: $portname, skipping uninstall"
+ }
continue
}
set composite_version [composite_version $portversion [array get variations]]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130710/ac109fce/attachment.html>
More information about the macports-changes
mailing list