[38197] branches/gsoc08-framework/macportssource/macports1.0

armahg at macports.org armahg at macports.org
Sat Jul 12 02:09:38 PDT 2008


Revision: 38197
          http://trac.macosforge.org/projects/macports/changeset/38197
Author:   armahg at macports.org
Date:     2008-07-12 02:09:37 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
Added macports.tcl patch file. Applied patch file to macports.tcl

Modified Paths:
--------------
    branches/gsoc08-framework/macportssource/macports1.0/macports.tcl

Added Paths:
-----------
    branches/gsoc08-framework/macportssource/macports1.0/macports.tcl.patch

Modified: branches/gsoc08-framework/macportssource/macports1.0/macports.tcl
===================================================================
--- branches/gsoc08-framework/macportssource/macports1.0/macports.tcl	2008-07-12 07:51:51 UTC (rev 38196)
+++ branches/gsoc08-framework/macportssource/macports1.0/macports.tcl	2008-07-12 09:09:37 UTC (rev 38197)
@@ -76,6 +76,13 @@
 # ui_channels returns a list of channels to output the message to, empty for
 #     no message.
 # if these functions are not provided, defaults are used.
+# Clients of the library may optionally provide ui_init with the following
+# prototype.
+#     proc ui_init {priority prefix channels message}
+# ui_init needs to correctly define the proc ::ui_$priority {message} or throw
+# an error.
+# if this function is not provided or throws an error, default procedures for
+# ui_$priority are defined.
 
 # ui_options accessor
 proc macports::ui_isset {val} {
@@ -118,15 +125,19 @@
             set prefix [ui_prefix_default $priority]
         }
 
-        if {$nbchans == 1} {
-            set chan [lindex $channels 0]
-            proc ::ui_$priority {str} [subst { puts $chan "$prefix\$str" }]
-        } else {
-            proc ::ui_$priority {str} [subst {
-                foreach chan \$channels {
-                    puts $chan "$prefix\$str"
-                }
-            }]
+        try {
+            ::ui_init $priority $prefix $channels $message
+        } catch * {
+            if {$nbchans == 1} {
+                set chan [lindex $channels 0]
+                proc ::ui_$priority {str} [subst { puts $chan "$prefix\$str" }]
+            } else {
+                proc ::ui_$priority {str} [subst {
+                    foreach chan \$channels {
+                        puts $chan "$prefix\$str"
+                    }
+                }]
+            }
         }
 
         # Call ui_$priority

Added: branches/gsoc08-framework/macportssource/macports1.0/macports.tcl.patch
===================================================================
--- branches/gsoc08-framework/macportssource/macports1.0/macports.tcl.patch	                        (rev 0)
+++ branches/gsoc08-framework/macportssource/macports1.0/macports.tcl.patch	2008-07-12 09:09:37 UTC (rev 38197)
@@ -0,0 +1,47 @@
+Index: macports.tcl
+===================================================================
+--- macports.tcl	(revision 37802)
++++ macports.tcl	(working copy)
+@@ -76,6 +76,13 @@
+ # ui_channels returns a list of channels to output the message to, empty for
+ #     no message.
+ # if these functions are not provided, defaults are used.
++# Clients of the library may optionally provide ui_init with the following
++# prototype.
++#     proc ui_init {priority prefix channels message}
++# ui_init needs to correctly define the proc ::ui_$priority {message} or throw
++# an error.
++# if this function is not provided or throws an error, default procedures for
++# ui_$priority are defined.
+ 
+ # ui_options accessor
+ proc macports::ui_isset {val} {
+@@ -118,15 +125,19 @@
+             set prefix [ui_prefix_default $priority]
+         }
+ 
+-        if {$nbchans == 1} {
+-            set chan [lindex $channels 0]
+-            proc ::ui_$priority {str} [subst { puts $chan "$prefix\$str" }]
+-        } else {
+-            proc ::ui_$priority {str} [subst {
+-                foreach chan \$channels {
+-                    puts $chan "$prefix\$str"
+-                }
+-            }]
++        try {
++            ::ui_init $priority $prefix $channels $message
++        } catch * {
++            if {$nbchans == 1} {
++                set chan [lindex $channels 0]
++                proc ::ui_$priority {str} [subst { puts $chan "$prefix\$str" }]
++            } else {
++                proc ::ui_$priority {str} [subst {
++                    foreach chan \$channels {
++                        puts $chan "$prefix\$str"
++                    }
++                }]
++            }
+         }
+ 
+         # Call ui_$priority
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080712/21837b2c/attachment-0001.html 


More information about the macports-changes mailing list