Changeset 138948 for trunk/base


Ignore:
Timestamp:
Jul 24, 2015, 9:46:53 PM (5 years ago)
Author:
raimue@…
Message:

macports1.0: Don't add a special "debuglog" string to channels, we want to log everything anyway

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/macports1.0/macports.tcl

    r138946 r138948  
    139139        return 1
    140140    }
    141     # Add our log-channel to all already initialized channels
    142     foreach key [array names channels] {
    143         set macports::channels($key) [concat $macports::channels($key) debuglog]
    144     }
    145141    return 0
    146142}
     
    235231
    236232    foreach chan $macports::channels($priority) {
    237         if {[info exists ::debuglog] && ($chan eq "debuglog")} {
    238             set chan $::debuglog
    239             if {[info exists macports::current_phase]} {
    240                 set phase $macports::current_phase
    241             }
    242             set strprefix ":${priority}:$phase "
    243             if {[lindex $args 0] eq "-nonewline"} {
    244                 puts -nonewline $chan $strprefix[lindex $args 1]
    245             } else {
    246                 puts $chan $strprefix[lindex $args 0]
    247             }
    248 
     233        if {[lindex $args 0] eq "-nonewline"} {
     234            puts -nonewline $chan $prefix[lindex $args 1]
    249235        } else {
    250             if {[lindex $args 0] eq "-nonewline"} {
    251                 puts -nonewline $chan $prefix[lindex $args 1]
    252             } else {
    253                 puts $chan $prefix[lindex $args 0]
    254             }
    255         }
    256     }
    257 }
     236            puts $chan $prefix[lindex $args 0]
     237        }
     238    }
     239
     240    if {[info exists ::debuglog]} {
     241        set chan $::debuglog
     242        if {[info exists macports::current_phase]} {
     243            set phase $macports::current_phase
     244        }
     245        set strprefix ":${priority}:$phase "
     246        if {[lindex $args 0] eq "-nonewline"} {
     247            puts -nonewline $chan $strprefix[lindex $args 1]
     248        } else {
     249            puts $chan $strprefix[lindex $args 0]
     250        }
     251    }
     252}
     253
    258254proc macports::ui_init {priority args} {
    259255    global macports::channels ::debuglog
     
    266262    }
    267263
    268     # if some priority initialized after log file is being created
    269     if {[info exists ::debuglog]} {
    270         set channels($priority) [concat $channels($priority) debuglog]
    271     }
    272264    # Simplify ui_$priority.
    273265    try {
Note: See TracChangeset for help on using the changeset viewer.