Bug 408571 - tcllib hardcodes the version number in the installation path
Summary: tcllib hardcodes the version number in the installation path
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: tcllib
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Wart
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-03 12:31 UTC by Sergio Pascual
Modified: 2007-12-04 15:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-12-04 09:57:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sergio Pascual 2007-12-03 12:31:40 UTC
Description of problem:
The installation path of tcllib is /usr/share/tcl8.4/tcllib-%{version} where
version is 1.10 in F8 and 1.9 (for the moment) in F7. 

Is there any reason to write the version number in the directory path instead of
installing directly in /usr/share/tcl8.4/tcllib? 

With a versionless directory name, applications will work without patching with
different versions of tcllib



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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Wart 2007-12-03 15:54:40 UTC
(In reply to comment #0)
> Is there any reason to write the version number in the directory path instead of
> installing directly in /usr/share/tcl8.4/tcllib? 
> 
> With a versionless directory name, applications will work without patching with
> different versions of tcllib

Adding the version number in the directory name allows multiple version of
tcllib to be installed without conflicting with each other.  Tcl supports having
multiple packages versions available, and lets you select which one you want to
use with the 'package require <version>' command.

I would argue that no Tcl application should depend on any fixed directory for
packages like tcllib, as long as they appear as a child of one of Tcl's
auto_path directories.  If the package can be found via auto_path, then it will
be made available to the application through the 'package require' command in
Tcl, so that the application never needs to know exactly where the package is
installed.

If you have an alternate concrete use case that does require the application to
know the exact directory where tcllib is installed, then please describe it so
that I can either help you redesign the application to remove this requirement,
or reassess whether tcllib really needs to have its installation directory changed.

Comment 2 Mamoru TASAKA 2007-12-03 16:07:51 UTC
I am not familiar with tcl, however this is from ds9
review request (bug 352761).
https://bugzilla.redhat.com/show_bug.cgi?id=352761#c16

The relevant code in ds9 is /usr/share/ds9/src/ds9.tcl, which
contains:
------------------------------------------------------------
    65  if {![catch {package present checkdns}]} {
    66      set ds9(root) "/usr/share/ds9"
    67  
    68      source /usr/share/tcl8.4/msgcat1.3/msgcat.tcl
    69      source /usr/share/tcl8.4/http2.5/http.tcl
    70  
    71      source $tcllib_library/base64/base64.tcl
    72      source $tcllib_library/log/log.tcl
    73      source $tcllib_library/ftp/ftp.tcl
    74      source $tcllib_library/textutil/repeat.tcl
    75      source $tcllib_library/textutil/tabify.tcl
    76      source $blt_library/graph.tcl
    77      source $blt_library/tabset.tcl
    78  
    79      source $ds9(root)/src/source.tcl
    80  
    81      # fix ::tk and msgcat
    82      rename ::tk::msgcat::mc {}
    83      rename ::tk::msgcat::mcmax {}
    84  
    85      namespace import ::msgcat::mc
    86      namespace import ::msgcat::mcmax
    87      ::msgcat::mcload [file join $::tk_library msgs]
    88  
    89  } else {
----------------------------------------------------------------

Comment 3 Wart 2007-12-04 15:19:41 UTC
This bug has already been closed, but I wanted to add a note that it was closed
as 'NOTABUG' because the ds9 maintainer has decided to replace the 'source'
commands with 'package require' in order to make ds9 more resilient against
package directory path changes in the dependent libraries.


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