[100072] trunk/base/src/port1.0/porttrace.tcl

cal at macports.org cal at macports.org
Mon Nov 26 12:07:50 PST 2012


Revision: 100072
          https://trac.macports.org/changeset/100072
Author:   cal at macports.org
Date:     2012-11-26 12:07:50 -0800 (Mon, 26 Nov 2012)
Log Message:
-----------
porttrace: make slave thread open the registry

Without this, the first attempt to query the registry can fail

Modified Paths:
--------------
    trunk/base/src/port1.0/porttrace.tcl

Modified: trunk/base/src/port1.0/porttrace.tcl
===================================================================
--- trunk/base/src/port1.0/porttrace.tcl	2012-11-26 20:03:14 UTC (rev 100071)
+++ trunk/base/src/port1.0/porttrace.tcl	2012-11-26 20:07:50 UTC (rev 100072)
@@ -175,14 +175,13 @@
 # Private
 # Create the slave thread.
 proc porttrace::create_slave {workpath trace_fifo} {
-    global trace_thread prefix developer_dir
+    global trace_thread prefix developer_dir registry.path
     # Create the thread.
     set trace_thread [macports_create_thread]
 
-    # The slave thread requires the registry package.
-    thread::send $trace_thread "package require registry 1.0"
-    # and this file as well.
+    # The slave thred needs this file and macports 1.0
     thread::send $trace_thread "package require porttrace 1.0"
+    thread::send $trace_thread "package require macports 1.0"
     # slave needs ui_{info,warn,debug,error}...
     # make sure to sync this with ../pextlib1.0/tracelib.c!
     thread::send $trace_thread "macports::ui_init debug"
@@ -191,6 +190,10 @@
     thread::send $trace_thread "macports::ui_init error"
     # and these variables
     thread::send $trace_thread "set prefix \"$prefix\"; set developer_dir \"$developer_dir\""
+    # The slave thread requires the registry package.
+    thread::send $trace_thread "package require registry 1.0"
+    # and an open registry
+    thread::send $trace_thread "registry::open [file join ${registry.path} registry registry.db]"
 
     # Initialize the slave
     thread::send $trace_thread "porttrace::slave_init $trace_fifo $workpath"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121126/9b61719c/attachment.html>


More information about the macports-changes mailing list