Bug 227951

Summary: tcl_findLibrary is not thorough enough
Product: [Fedora] Fedora Reporter: Wart <wart>
Component: tclAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: sander
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-18 08:19:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 226893    
Attachments:
Description Flags
update tcl_findLibrary procedure in auto.tcl none

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):
tcl-8.5a5-6.fc7

How reproducible:
Always

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
directories: 
    /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:

http://sourceforge.net/tracker/index.php?func=detail&aid=1655677&group_id=10894&atid=360894
http://sourceforge.net/tracker/index.php?func=detail&aid=765642&group_id=12997&atid=112997

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