<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch release-2.3
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/408af10dd4dbea05bb9fdf6598ebab4f6a08f995">https://github.com/macports/macports-base/commit/408af10dd4dbea05bb9fdf6598ebab4f6a08f995</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 408af10dd4dbea05bb9fdf6598ebab4f6a08f995
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Thu Nov 24 19:56:27 2016 +0100
<span style='display:block; white-space:pre;color:#404040;'> port info: Re-implement broken subfield separators
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The subfield_sep variable was not used anymore after 30c27d5, replace it
</span><span style='display:block; white-space:pre;color:#404040;'> with specific separators for the different output modes.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/52928
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit ba2002cbb24a451ce9bbd50256102bc73bf27bc3)
</span>---
src/port/port.tcl | 39 +++++++++++++++++++++------------------
1 file changed, 21 insertions(+), 18 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port/port.tcl b/src/port/port.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 1df03d6..0a57e1b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2006,21 +2006,22 @@ proc action_info { action portlist opts } {
</span> }
array unset options ports_info_index
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Understand which info items are actually lists
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # (this could be overloaded to provide a generic formatting code to
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # allow us to, say, split off the prefix on libs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Understand which info items are actually lists by specifying
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # separators for the output. The list items correspond to the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # normal, --pretty, and --line output formats.
</span> array set list_map {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- categories ", "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_fetch ", "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_extract ", "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build ", "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib ", "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_run ", "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- maintainers "\n"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- platforms ", "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- variants ", "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- conflicts ", "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- subports ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ categories {", " ", " ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_fetch {", " ", " ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_extract {", " ", " ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build {", " ", " ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib {", " ", " ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run {", " ", " ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_test {", " ", " ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ maintainers {", " "\n" ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ platforms {", " ", " ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variants {", " ", " ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ conflicts {", " ", " ","}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ subports {", " ", " ","}
</span> }
# Label map for pretty printing
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2077,14 +2078,16 @@ proc action_info { action portlist opts } {
</span> # Set up our field separators
set show_label 1
set field_sep "\n"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set subfield_sep ", "
</span> set pretty_print 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set list_map_index 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # For human-readable summary, which is the default with no options
if {[llength [array get options ports_info_*]] == 0} {
set pretty_print 1
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set list_map_index 1
</span> } elseif {[info exists options(ports_info_pretty)]} {
set pretty_print 1
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set list_map_index 1
</span> array unset options ports_info_pretty
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2094,7 +2097,7 @@ proc action_info { action portlist opts } {
</span> set noseparator 1
set show_label 0
set field_sep "\t"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set subfield_sep ","
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set list_map_index 2
</span> }
# Figure out whether to show field name
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2249,7 +2252,7 @@ proc action_info { action portlist opts } {
</span> }
#End of special pretty-print formatting for certain fields
if {[info exists list_map($ropt)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set field [join $inf $list_map($ropt)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set field [join $inf [lindex $list_map($ropt) $list_map_index]]
</span> } else {
set field $inf
}
</pre><pre style='margin:0'>
</pre>