New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #18719: macports.tcl.diff

File macports.tcl.diff, 1.8 KB (added by blb@…, 3 years ago)

diff to macports1.0/macports.tcl

  • macports.tcl

    old new  
    108108 
    109109 
    110110proc macports::ui_init {priority args} { 
     111    global macports::channels 
     112 
    111113    # Get the list of channels. 
    112114    try { 
    113115        set channels [ui_channels $priority] 
     
    116118    } 
    117119 
    118120    # Simplify ui_$priority. 
    119     set nbchans [llength $channels] 
    120     if {$nbchans == 0} { 
     121    if {[llength $channels] == 0} { 
    121122        proc ::ui_$priority {args} {} 
    122123    } else { 
    123124        try { 
     
    129130        try { 
    130131            eval ::ui_init $priority $prefix $channels $args 
    131132        } catch * { 
    132             if {$nbchans == 1} { 
    133                 set chan [lindex $channels 0] 
    134                 proc ::ui_$priority {args} [subst { 
     133            proc ::ui_$priority {args} [subst { 
     134                global macports::channels 
     135                foreach chan {$macports::channels} { 
    135136                    if {\[lindex \$args 0\] == "-nonewline"} { 
    136                         puts -nonewline $chan "$prefix\[lindex \$args 1\]" 
     137                        puts -nonewline \$chan "$prefix\[lindex \$args 1\]" 
    137138                    } else { 
    138                         puts $chan "$prefix\[lindex \$args 0\]" 
     139                        puts \$chan "$prefix\[lindex \$args 0\]" 
    139140                    } 
    140                 }] 
    141             } else { 
    142                 proc ::ui_$priority {args} [subst { 
    143                     foreach chan \$channels { 
    144                         if {\[lindex \$args 0\] == "-nonewline"} { 
    145                             puts -nonewline $chan "$prefix\[lindex \$args 1\]" 
    146                         } else { 
    147                             puts $chan "$prefix\[lindex \$args 0\]" 
    148                         } 
    149                     } 
    150                 }] 
    151             } 
     141                } 
     142            }] 
    152143        } 
    153144 
    154145        # Call ui_$priority