Ticket #21725: portlist.diff
File portlist.diff, 2.1 KB (added by kurthindenburg (Kurt Hindenburg), 10 years ago) |
---|
-
port.tcl
3789 3789 3790 3790 3791 3791 proc action_list { action portlist opts } { 3792 global private_options 3792 global private_options macports::sources 3793 3793 set status 0 3794 3794 set local_sources [list] 3795 3796 foreach source $sources { 3797 set src [string trim [lindex $source 0]] 3798 if {[lsearch $local_sources $src ] < 0} { 3799 lappend local_sources $src 3800 } 3801 } 3802 3795 3803 # Default to list all ports if no portnames are supplied 3796 3804 if { ![llength $portlist] && [info exists private_options(ports_no_args)] && $private_options(ports_no_args) eq "yes"} { 3797 3805 add_to_portlist portlist [list name "-all-"] … … 3817 3825 } 3818 3826 } 3819 3827 3828 set portpicked false 3829 set matches [list] 3820 3830 foreach {name array} $res { 3821 3831 array unset portinfo 3822 3832 array set portinfo $array … … 3824 3834 if {[info exists portinfo(portdir)]} { 3825 3835 set outdir $portinfo(portdir) 3826 3836 } 3827 puts [format "%-30s @%-14s %s" $portinfo(name) $portinfo(version) $outdir] 3837 set porturl $portinfo(porturl) 3838 if {[macports::ui_isset ports_verbose]} { 3839 set bullet "" 3840 set len [expr {[string length $porturl] - [string length $outdir] - 2}] 3841 set sourceindex [lsearch $local_sources [string range $porturl 0 $len]] 3842 if {!$portpicked} { 3843 set bullet "*" 3844 } 3845 set portpicked true 3846 puts [format "%-30s @%-14s %s \[%s\]%s" $portinfo(name) $portinfo(version) $outdir $sourceindex $bullet] 3847 } else { 3848 puts [format "%-30s @%-14s %s" $portinfo(name) $portinfo(version) $outdir] 3849 } 3828 3850 } 3829 3851 } 3830 3852 # Display legend 3853 if {[macports::ui_isset ports_verbose]} { 3854 set index -1 3855 foreach source $local_sources { 3856 incr index 3857 ui_msg "${index}:${source}" 3858 } 3859 } 3831 3860 return $status 3832 3861 } 3833 3862