1 | --- orig/macports.tcl 2014-03-02 16:30:56.000000000 -0800 |
---|
2 | +++ changed/macports.tcl 2014-03-02 15:15:20.000000000 -0800 |
---|
3 | |
---|
4 | # mportselect |
---|
5 | -# * command: The only valid commands are list, set and show |
---|
6 | +# * command: The only valid commands are list, set ,show and summary |
---|
7 | # * group: This argument should correspond to a directory under |
---|
8 | # ${macports::prefix}/etc/select. |
---|
9 | # * version: This argument is only used by the 'set' command. |
---|
10 | # On error mportselect returns with the code 'error'. |
---|
11 | -proc mportselect {command group {version {}}} { |
---|
12 | +proc mportselect {command {group ""} {version {}}} { |
---|
13 | ui_debug "mportselect \[$command] \[$group] \[$version]" |
---|
14 | |
---|
15 | set conf_path ${macports::prefix}/etc/select/$group |
---|
16 | @@ -4226,6 +4238,16 @@ |
---|
17 | } |
---|
18 | return [lsort $lversions] |
---|
19 | } |
---|
20 | + summary { |
---|
21 | + # Return the list of portgroups in ${macports::prefix}/etc/select |
---|
22 | + if {[catch {set lportgroups [glob -directory $conf_path *]} result]} { |
---|
23 | + global errorInfo |
---|
24 | + ui_debug "${result}: $errorInfo" |
---|
25 | + return -code error [concat "No ports with the select" \ |
---|
26 | + "option were found."] |
---|
27 | + } |
---|
28 | + return $lportgroups |
---|
29 | + } |
---|
30 | set { |
---|
31 | # Use ${conf_path}/$version to read in sources. |
---|
32 | if {$version eq {} || $version eq {base} || $version eq {current} |
---|