Tcl Source Code

View Ticket
Login
Ticket UUID: 1163357
Title: build dir outside source dir not supported
Type: Bug Version: obsolete: 8.5a3
Submitter: dgp Created on: 2005-03-14 23:26:17
Subsystem: 80. Thread Package Assigned To: vasiljevic
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2005-03-15 15:57:24
Resolution: Fixed Closed By: vasiljevic
    Closed on: 2005-03-15 08:57:24
Description:
$ gunzip -c thread2.6.1.tar.gz | tar xf -
$ mkdir build
$ cd build
$ ../thread2.6.1/configure
...
$ make test
...
couldn't read file "./ttrace.tcl": no such file or
directory
    while executing
"source [file join . ttrace.tcl]"
    invoked from within
"if {[file readable [file join . .. lib ttrace.tcl]]} { 
            source [file join . .. lib ttrace.tcl]
        } else {
            source [file j..."
    ("package ifneeded" script)
    invoked from within
"package require Thread 2.6"
    (file "../thread2.6.1/tests/all.tcl" line 46)

The pkgIndex.tcl file is constructed to
look for the files ../lib/ttrace.tcl or ttrace.tcl
relative to the $dir that holds pkgIndex.tcl.
This implies that only builds in subdirs of
thread.2.6.1 can be tested prior to installation.

It should not be so.  Other build dirs should
be supported.
User Comments: vasiljevic added on 2005-03-15 15:57:24:
Logged In: YES 
user_id=95086

Fixed in HEAD. Also corrected the problem when directory 
path contains blanks or other special characters.

dgp added on 2005-03-15 06:50:21:
Logged In: YES 
user_id=80530


BTW, that [subst] scheme within
the pkgIndex.tcl file will also fail
whenever $dir has spaces in it,
or is otherwise "list-unsafe".

dgp added on 2005-03-15 06:34:24:

File Added - 125622: 1163357.patch

Logged In: YES 
user_id=80530


Attached patch is good enough
to let the current test suite run
successfully.  Perhaps better solutions
involve [tcl_findLibrary] or
[thread::pkgconfig get scriptdir,source].

Attachments: