<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/014e51fb61d95f234d97221bbeb2d2480d658b86">https://github.com/macports/macports-base/commit/014e51fb61d95f234d97221bbeb2d2480d658b86</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 014e51fb61d95f234d97221bbeb2d2480d658b86
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Tue Feb 7 19:10:51 2017 +0100
<span style='display:block; white-space:pre;color:#404040;'> registry2.0: Simplify port formatting for question
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Simplify the formatting of port strings that are passed to the procs
</span><span style='display:block; white-space:pre;color:#404040;'> given in $ui_options(questions_*choice), or in the non-interactive case,
</span><span style='display:block; white-space:pre;color:#404040;'> are printed with ui_msg.
</span>---
src/registry2.0/portimage.tcl | 24 +++++++-----------------
src/registry2.0/portuninstall.tcl | 21 +++++++--------------
2 files changed, 14 insertions(+), 31 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/portimage.tcl b/src/registry2.0/portimage.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index cd519ad..72dcdfd 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/portimage.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/registry2.0/portimage.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -228,25 +228,15 @@ proc _check_registry {name version revision variants} {
</span> ui_msg "$UI_PREFIX [msgcat::mc $msg]"
}
foreach i $ilist {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set iname [$i name]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set iversion [$i version]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set irevision [$i revision]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ivariants [$i variants]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ##
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # User Interaction Question
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Asking choice to select option in case of ambiguous activate
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portstr [format "%s @%s_%s%s" [$i name] [$i version] [$i revision] [$i variants]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[$i state] eq "installed"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append portstr [msgcat::mc " (active)"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if {[info exists macports::ui_options(questions_singlechoice)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [$i state] eq "installed" } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend portilist "$iname @${iversion}_${irevision}${ivariants} (active)"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend portilist "$iname @${iversion}_${irevision}${ivariants}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend portilist "$portstr"
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [$i state] eq "installed" } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$UI_PREFIX [format [msgcat::mc " %s @%s_%s%s (active)"] $iname $iversion $irevision $ivariants]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$UI_PREFIX [format [msgcat::mc " %s @%s_%s%s"] $iname $iversion $irevision $ivariants]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$UI_PREFIX $portstr"
</span> }
}
if {[info exists macports::ui_options(questions_singlechoice)]} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/portuninstall.tcl b/src/registry2.0/portuninstall.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 3192c24..e1ad2fe 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/portuninstall.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/registry2.0/portuninstall.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -151,22 +151,15 @@ proc uninstall {portname {version ""} {revision ""} {variants 0} {optionslist ""
</span> }
set sortedlist [portlist_sortint $ilist]
foreach i $sortedlist {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ispec "[$i version]_[$i revision][$i variants]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ##
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # User Interaction Question
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Asking choice to select option in case of ambiguous uninstall
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portstr [format "%s @%s_%s%s" [$i name] [$i version] [$i revision] [$i variants]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[$i state] eq "installed"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append portstr [msgcat::mc " (active)"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if {[info exists macports::ui_options(questions_multichoice)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [$i state] eq "installed" } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend portilist "[$i name] @[$i version]_[$i revision][$i variants] (active)"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend portilist "[$i name] @[$i version]_[$i revision][$i variants]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend portilist "$portstr"
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[$i state] eq "installed"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$UI_PREFIX [format [msgcat::mc " %s @%s (active)"] [$i name] $ispec]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$UI_PREFIX [format [msgcat::mc " %s @%s"] [$i name] $ispec]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$UI_PREFIX $portstr"
</span> }
}
if {[info exists macports::ui_options(questions_multichoice)]} {
</pre><pre style='margin:0'>
</pre>