Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 227951 - tcl_findLibrary is not thorough enough
Summary: tcl_findLibrary is not thorough enough
Alias: None
Product: Fedora
Classification: Fedora
Component: tcl
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact:
Depends On:
Blocks: 226893
TreeView+ depends on / blocked
Reported: 2007-02-09 01:19 UTC by Wart
Modified: 2008-01-18 08:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-01-18 08:19:03 UTC

Attachments (Terms of Use)
update tcl_findLibrary procedure in auto.tcl (deleted)
2007-02-09 01:21 UTC, Wart
no flags Details | Diff

Description Wart 2007-02-09 01:19:30 UTC
Description of problem:
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 (see bug #226893)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  Rebuild and install Tcl with the auto_path patch in bug #226893
2.  Install Tk
3.  Start a wish shell
Actual results:
wish does not initialize correctly and gives the following error:
"Application initialization failed: Can't find a usable tk.tcl in the following
    /usr/share/tcl8.5/tk8.5 /usr/lib/tk8.5 /lib/tk8.5 /usr/library

This probably means that tk wasn't installed properly."

Note that it does _not_ look in /usr/share/tk8.5, where tk.tcl actually lives.

Expected results:
wish starts as expected

Additional info:

The attached patch adds an additional directory, $tcl_library/../foo$version to
the search path.

I'm also sending this patch to the upstream devs so that it can get included in
the core Tcl sources.

Comment 1 Wart 2007-02-09 01:21:07 UTC
Created attachment 147722 [details]
update tcl_findLibrary procedure in auto.tcl

This patch updates the tcl_findLibrary procedure in auto.tcl, which is used by
Tk to find tk.tcl.

Comment 2 Marcela Mašláňová 2007-02-09 14:13:36 UTC
Thanks for patch.

It has to wait for new version 8.5.

Comment 3 Wart 2007-02-09 18:04:01 UTC
Upstream acknowledges the problem, and proposes a slightly more complicated fix:

This patch should be considered a workaround until the above upstream bug is fixed.

Comment 4 Marcela Mašláňová 2008-01-18 08:19:03 UTC
fixed in tcl-1:8.5.0-6

Note You need to log in before you can comment on or make changes to this bug.