<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/ba2002cbb24a451ce9bbd50256102bc73bf27bc3">https://github.com/macports/macports-base/commit/ba2002cbb24a451ce9bbd50256102bc73bf27bc3</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit ba2002cbb24a451ce9bbd50256102bc73bf27bc3
</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>---
src/port/port.tcl | 40 +++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 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 5312e5a..6d5db79 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;'>@@ -1981,23 +1981,23 @@ 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;'>- depends_test ", "
</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:#ffe0e0;'>- patchfiles ", "
</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><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles {", " ", " ","}
</span> }
# Label map for pretty printing
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2059,14 +2059,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:#e0ffe0;'>+ set list_map_index 0
</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;'>@@ -2076,7 +2078,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;'>@@ -2232,7 +2234,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>