Skip to content
Browse files

create unique interpreter names

git-svn-id: d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
landonf committed Aug 18, 2002
1 parent 6f1a338 commit 6dcd9f8a6ffe9840b7fcdaa4821e0275b21e5caf
Showing with 12 additions and 10 deletions.
  1. +12 −10 Install/darwinports1.0/darwinports.tcl
@@ -6,6 +6,7 @@ global ports_opts
global bootstrap_options
set bootstrap_options "sysportpath libpath auto_path"
set portinterp_options "sysportpath portpath auto_path portconf"
set uniqid 0

# XXX not portable
proc ccextension {file} {
@@ -64,31 +65,32 @@ proc init {args} {

proc build {portdir chain target {options ""}} {
global targets portpath portinterp_options
global targets portpath portinterp_options uniqid

if [file isdirectory $portdir] {
cd $portdir
set portpath [pwd]
interp create workerbee
workerbee alias {} build workerbee build
set workername workername[incr uniqid]
interp create $workername
$workername alias build build

foreach opt $portinterp_options {
upvar #0 $opt upopt
if [info exists upopt] {
workerbee eval set system_options($opt) \"$upopt\"
workerbee eval set $opt \"$upopt\"
$workername eval set system_options($opt) \"$upopt\"
$workername eval set $opt \"$upopt\"

foreach opt $options {
if {[regexp {([A-Za-z_\.]+)=(.+)} $opt match key val] == 1} {
workerbee eval set user_options($key) \"$val\"
workerbee eval set $key \"$val\"
$workername eval set user_options($key) \"$val\"
$workername eval set $key \"$val\"
workerbee eval source Portfile
workerbee eval {flock [open Portfile r] -exclusive}
workerbee eval eval_targets targets $chain $target
$workername eval source Portfile
$workername eval {flock [open Portfile r] -exclusive}
$workername eval eval_targets targets $chain $target
} else {
return -code error "Portdir $portpath does not exist"

0 comments on commit 6dcd9f8

Please sign in to comment.
You can’t perform that action at this time.