[46052] trunk/base/src/port/port.tcl
jmr at macports.org
jmr at macports.org
Tue Jan 27 17:32:11 PST 2009
Revision: 46052
http://trac.macports.org/changeset/46052
Author: jmr at macports.org
Date: 2009-01-27 17:32:11 -0800 (Tue, 27 Jan 2009)
Log Message:
-----------
Error out when asked to upgrade a port that is not installed, e.g. the infamous "port upgrade all"
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2009-01-28 01:23:55 UTC (rev 46051)
+++ trunk/base/src/port/port.tcl 2009-01-28 01:32:11 UTC (rev 46052)
@@ -1871,11 +1871,15 @@
return 1
}
foreachport $portlist {
- # Global variations will have to be merged into the specified
- # variations, but perhaps after the installed variations are
- # merged. So we pass them into upgrade:
- macports::upgrade $portname "port:$portname" [array get global_variations] [array get variations] [array get options]
- }
+ if {[catch {registry::installed $portname}]} {
+ ui_error "$portname is not installed"
+ return 1
+ }
+ # Global variations will have to be merged into the specified
+ # variations, but perhaps after the installed variations are
+ # merged. So we pass them into upgrade:
+ macports::upgrade $portname "port:$portname" [array get global_variations] [array get variations] [array get options]
+ }
return 0
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090127/d24529cc/attachment.html>
More information about the macports-changes
mailing list