When bumping tcl...

Michael Thomas wart at kobold.org
Thu Feb 1 21:04:59 UTC 2007


Jesse Keating wrote:
> Please alert folks you're doing this.  fedora-maintainers at redhat.com is the 
> right place (you should be subscribed!!).
> 
[...]
> 
> That's just the list in core, I suspect many more broken in Extras.

I've fixed tcllib in Extras.  Even though it doesn't have a dependency 
on libtcl8.4.so, it does have a directory dependency on the 
/usr/lib/tcl8.4 directory.

This leads me to a related issue:

Tcl searches for packages in 3 directories:
  * /usr/share/tcl8.5
  * /usr/share
  * /usr/lib

The search algorithm involves going into each subdirectory of these 
three directories, looking for a file named 'pkgIndex.tcl', and then 
reading it.  Since there are quite a few subdirectories in /usr/share 
and /usr/lib that aren't tcl-related, this results in a lot of wasted 
time and effort.

To fix, the default value for 'auto_path' in Tcl needs to be reduced to 
2 directories:  /usr/lib{64}/tcl8.x and /usr/share/tcl8.x.  My informal 
tests have shown that this can reduce the initial load time for Tcl 
scripts from 3.7s to 0.2s.

Tcl extension packages in Fedora would also have to be modified to 
install into these version-specific tcl directories, instead of the 
current convention of /usr/lib|/usr/share.  A 'tcl-sitearch' macro would 
also be needed in Tcl package spec files to detect the correct install 
directory.  This would bring Tcl more in line with the directory 
structure used by other scripting languages (perl, python) in Fedora, 
and give Tcl applications a boost in startup times.

I'll file this request in Bugzilla, but was hoping to get feedback from 
the Fedora devs, especially those who maintain Tcl extensions, before 
any changes were made.

--Wart




More information about the Fedora-maintainers mailing list