Tk Library Source Code

View Ticket
Login
Ticket UUID: 2370853
Title: Wrong path added to auto_path
Type: Bug Version: None
Submitter: johnseal Created on: 2008-12-01 12:33:29
Subsystem: None Assigned To: aku
Priority: 5 Medium Severity: Important
Status: Closed Last Modified: 2024-06-03 19:06:52
Resolution: Out of Date Closed By: aku
    Closed on: 2024-06-03 19:06:52
Description:
If tcllib.kit (the one from http://www.equi4.com/pub/om/sdarchive/) is sourced after twapi-1.1.5.kit, a wrong path gets added to auto_path and "package require tcllib" fails.  If tcllib.kit is sourced alone, or before twapi-1.1.5.kit, it adds two entries to auto_path:

(ORmaint) 1 % set auto_path
<several paths>
(ORmaint) 2 % source tcllib.kit
(ORmaint) 3 % set auto_path
<same paths plus> <path to>/tcllib.kit/lib <path to>/tcllib.kit/tcllib

This is with an 8.5.2 tclkit for Windows. But if sourced after twapi-1.1.5.kit, the second entry gets twapi's name instead of tcllib's:

(ORmaint) 1 % set auto_path
<several paths>
(ORmaint) 2 % source twapi-1.1.5.kit
(ORmaint) 3 % set auto_path
<same paths plus> <path to>/twapi-1.1.5.kit/lib
(ORmaint) 4 % source tcllib.kit
(ORmaint) 5 % set auto_path
<same paths plus> <path to>/twapi-1.1.5.kit/lib <path to>/tcllib.kit/lib <path to>/twapi-1.1.5.kit/tcllib

When I asked about this on c.l.t, Michael Schlenker suggested that it might be a bug in the tcllib kit packaging and asked me to file this bug report.
User Comments: aku added on 2024-06-03 19:06:52:
The `tcllib.kit` I am aware of (generated via `sak.tcl gendist` is self-extracting installer for tcllib. Sourcing it will run the packaged `installer.tcl`.

The described `tcllib.kit` on the other hand seems to mount itself and then makes the mounted virtual directory available to package management.

I do not remember where that would have come from.