Overview
| Artifact ID: | c91c404a93984e37af398bb5e8b7ea17fe47ca0d |
|---|---|
| Ticket: | 1655677fffffffffffffffffffffffffffffffff
tcl_findLibrary is not thorough enough |
| User & Date: | wart on 2007-02-09 01:38:45 |
Changes
- assignee changed to: "dgp"
- cmimetype changed to: "text/plain"
- comment changed to:
Let me preface by stating that this only causes problems when running Tcl with a slightly stripped-down auto_path. I realize this is a non-standard configuration, but hope that the solution makes sense in the general case as well. The tcl_findLibrary procedure is used to locate a packages foo.tcl script by looking in a few common locations. Unfortunately, it does not look in the sibling directory of Tcl's own script library. This causes problems for Tk when Tcl is built with a restricted auto_path. One directory that is not used in this search is the sibling of [::tcl::pkgconfig get scriptdir,runtime]: set value [::tcl::pkgconfig get scriptdir,runtime] [file join [file dirname $value] $basename$version] For example, if Tcl's script library is installed in /usr/share/tcl8.5, then tcl_findLibrary should look for foo's script library in /usr/share/foo8.5. This is not an issue in the standard Tcl/Tk installation because tcl_findLibrary also searches in subdirectories of auto_path, which includes the massive /usr/lib and /usr/share directories. But if Tcl is used with a restricted auto_path containing only /usr/share/tcl8.5 and /usr/lib/tcl8.5, then it won't find tk's tk.tcl in /usr/share/tk8.5. Also note that the following comment in $tk_src_dir/generic/tkInitScript.h is incorrect, $tcl_library/../tk$tk_version is _not_ a directory that is searched: " * In order to find tk.tcl during initialization, the following script is * invoked by Tk_Init(). It looks in several different directories: * * $tk_library - can specify a primary location, if set no * other locations will be checked * * $env(TK_LIBRARY) - highest priority so user can always override * the search path unless the application has * specified an exact directory above * * $tcl_library/../tk$tk_version * - look relative to init.tcl in an installed * lib directory (e.g. /usr/local) "
- foundin changed to: "obsolete: 8.5a5"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "wart"
- subsystem changed to: "38. Init - Library - Autoload"
- title changed to: "tcl_findLibrary is not thorough enough"
- type changed to: "RFE"