[147577] branches/portgroups-selector/base/src/port/port.tcl
raimue at macports.org
raimue at macports.org
Fri Apr 8 03:50:22 PDT 2016
Revision: 147577
https://trac.macports.org/changeset/147577
Author: raimue at macports.org
Date: 2016-04-08 03:50:22 -0700 (Fri, 08 Apr 2016)
Log Message:
-----------
Add port groups field to info action
Modified Paths:
--------------
branches/portgroups-selector/base/src/port/port.tcl
Modified: branches/portgroups-selector/base/src/port/port.tcl
===================================================================
--- branches/portgroups-selector/base/src/port/port.tcl 2016-04-08 06:42:22 UTC (rev 147576)
+++ branches/portgroups-selector/base/src/port/port.tcl 2016-04-08 10:50:22 UTC (rev 147577)
@@ -2023,6 +2023,7 @@
conflicts 1
subports 1
patchfiles 1
+ portgroups 1
"
# Label map for pretty printing
@@ -2046,6 +2047,7 @@
replaced_by "Replaced by"
subports "Sub-ports"
patchfiles "Patchfiles"
+ portgroups "Port Groups"
}
# Wrap-length map for pretty printing
@@ -2068,6 +2070,7 @@
maintainers 22
subports 22
patchfiles 22
+ portgroups 22
}
# Interpret a convenient field abbreviation
@@ -2164,7 +2167,13 @@
if {![info exists portinfo($ropt)]} {
set inf ""
} else {
- set inf [join $portinfo($ropt)]
+ if {$ropt eq "portgroups"} {
+ # preserve nested lists
+ set inf $portinfo($ropt)
+ } else {
+ # flatten list
+ set inf [join $portinfo($ropt)]
+ }
}
}
@@ -2183,6 +2192,12 @@
# Format the data
if { $ropt eq "maintainers" } {
set inf [unobscure_maintainers $inf]
+ } elseif {$ropt eq "portgroups"} {
+ set groups $inf
+ set inf {}
+ foreach x $groups {
+ lappend inf "[lindex $x 0]-[lindex $x 1]"
+ }
}
# ... special formatting for certain fields when prettyprinting
if {$pretty_print} {
@@ -4345,10 +4360,10 @@
array set cmd_opts_array {
edit {{editor 1}}
info {category categories conflicts depends_fetch depends_extract
- depends_build depends_lib depends_run depends_test
- depends description epoch fullname heading homepage index license
- line long_description
- maintainer maintainers name patchfiles platform platforms portdir
+ depends_build depends_lib depends_run depends_test depends
+ description epoch fullname group groups heading homepage
+ index license line long_description maintainer maintainers
+ name patchfiles platform platforms portdir portgroup portgroups
pretty replaced_by revision subports variant variants version}
contents {size {units 1}}
deps {index no-build}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160408/57d591b6/attachment.html>
More information about the macports-changes
mailing list