Changeset 23390


Ignore:
Timestamp:
Mar 30, 2007, 4:19:42 PM (13 years ago)
Author:
jberry@…
Message:

Fix bugs #11683, #10766.

Present a cleaner message for port installed and port outdated when the list of ports has been restricted. In these cases we now say 'none of the specified ports are outdated/installed' instead of 'no ports are installed/outdated.'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port/port.tcl

    r19992 r23390  
    15001500proc action_installed { action portlist opts } {
    15011501        set status 0
     1502        set restrictedList 0
    15021503        set ilist {}
    15031504        if { [llength $portlist] } {
     1505                set restrictedList 1
    15041506                foreachport $portlist {
    15051507                        set composite_version [composite_version $portversion [array get variations]]
    15061508                        if { [catch {set ilist [concat $ilist [registry::installed $portname $composite_version]]} result] } {
    1507                                 if {[string match "* not registered as installed." $result]} {
    1508                                         puts "Port $portname is not installed."
    1509                                 } else {
     1509                                if {![string match "* not registered as installed." $result]} {
    15101510                                        global errorInfo
    15111511                                        ui_debug "$errorInfo"
     
    15381538                        }
    15391539                }
     1540        } elseif { $restrictedList } {
     1541                puts "None of the specified ports are installed."
    15401542        } else {
    15411543                puts "No ports are installed."
     
    15541556        # If port names were supplied, limit ourselves to those port, else check all installed ports
    15551557        set ilist {}
     1558        set restrictedList 0
    15561559        if { [llength $portlist] } {
     1560                set restrictedList 1
    15571561                foreach portspec $portlist {
    15581562                        array set port $portspec
     
    16561660                        puts "No installed ports are outdated."
    16571661                }
     1662        } elseif { $restrictedList } {
     1663                puts "None of the specified ports are outdated."
    16581664        } else {
    16591665                puts "No ports are installed."
Note: See TracChangeset for help on using the changeset viewer.