[51378] branches/gsoc09-logging/base/src

enl at macports.org enl at macports.org
Sat May 23 11:44:30 PDT 2009


Revision: 51378
          http://trac.macports.org/changeset/51378
Author:   enl at macports.org
Date:     2009-05-23 11:44:29 -0700 (Sat, 23 May 2009)
Log Message:
-----------
Put ui_channels inside macports.tcl and restored original ui_channels handling

Modified Paths:
--------------
    branches/gsoc09-logging/base/src/macports1.0/macports.tcl
    branches/gsoc09-logging/base/src/port/port.tcl

Modified: branches/gsoc09-logging/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc09-logging/base/src/macports1.0/macports.tcl	2009-05-23 18:44:07 UTC (rev 51377)
+++ branches/gsoc09-logging/base/src/macports1.0/macports.tcl	2009-05-23 18:44:29 UTC (rev 51378)
@@ -106,17 +106,27 @@
     return 0
 }
 
+proc macports::init_logging {} {
+    global ::debuglog ::debuglogname
+    if {![info exists ::debuglog]} {
+        set ::debuglogname [mktemp /tmp/macports_debug.XXXXXX]
+        set ::debuglog [open $::debuglogname w]
+    }
+    return $::debuglog
+}
 
+
 proc macports::ui_init {priority args} {
     global macports::channels
+    set default_channel [macports::ui_channels_default $priority]
+    set logging_file [init_logging]
 
     # Get the list of channels.
     try {
-        set channels [ui_channels $priority]
+        set channels [concat [ui_channels $priority] $logging_file]
     } catch * {
-        set channels [ui_channels_default $priority]
+        set channels [concat $logging_file $default_channel]
     }
-
     # Simplify ui_$priority.
     if {[llength $channels] == 0} {
         proc ::ui_$priority {args} {}

Modified: branches/gsoc09-logging/base/src/port/port.tcl
===================================================================
--- branches/gsoc09-logging/base/src/port/port.tcl	2009-05-23 18:44:07 UTC (rev 51377)
+++ branches/gsoc09-logging/base/src/port/port.tcl	2009-05-23 18:44:29 UTC (rev 51378)
@@ -171,16 +171,6 @@
     }
 }
 
-proc ui_channels {priority} {
-    global ::debuglog ::debuglogname
-    set default_channel [macports::ui_channels_default $priority]
-    if {![info exists ::debuglog]} {
-        set ::debuglogname [mktemp /tmp/macports_debug.XXXXXX]
-        set ::debuglog [open $::debuglogname w]
-    }
-    return [concat $default_channel $::debuglog]
-}
-
 # Form a composite version as is sometimes used for registry functions
 proc composite_version {version variations {emptyVersionOkay 0}} {
     # Form a composite version out of the version and variations
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090523/28b99267/attachment.html>


More information about the macports-changes mailing list