Modified: trunk/base/src/port/port.tcl (105528 => 105529)
--- trunk/base/src/port/port.tcl 2013-04-23 21:09:14 UTC (rev 105528)
+++ trunk/base/src/port/port.tcl 2013-04-23 21:33:59 UTC (rev 105529)
@@ -419,11 +419,20 @@
# Supply a default porturl/portname if the portlist is empty
-proc require_portlist { nameportlist } {
+proc require_portlist { nameportlist {is_update "no"} } {
global private_options
upvar $nameportlist portlist
if {[llength $portlist] == 0 && (![info exists private_options(ports_no_args)] || $private_options(ports_no_args) == "no")} {
+ if {${is_update} == "yes"} {
+ # $> port upgrade outdated
+ # Error: No ports matched the given expression
+ # is not very user friendly - if we're in the special case of
+ # "upgrade", let's print a message that's a little easier to
+ # understand and less alarming.
+ ui_msg "Nothing to upgrade."
+ return 1
+ }
ui_error "No ports matched the given expression"
return 1
}
@@ -2633,7 +2642,7 @@
proc action_upgrade { action portlist opts } {
- if {[require_portlist portlist] || ([prefix_unwritable] && ![macports::global_option_isset ports_dryrun])} {
+ if {[require_portlist portlist "yes"] || ([prefix_unwritable] && ![macports::global_option_isset ports_dryrun])} {
return 1
}