Tk Library Source Code

View Ticket
Login
Ticket UUID: 720318
Title: modules can't be requested in safeBase
Type: Bug Version: None
Submitter: mic42 Created on: 2003-04-12 18:15:16
Subsystem: None Assigned To: nobody
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-03-03 05:32:14
Resolution: Out of Date Closed By: gwlester
    Closed on: 2004-03-02 22:32:07
Description:
Code to demonstrate the problem:

% ::safe::interpCreate test
test
% test eval {package require base64}
permission denied

Problem:
related to [Bug 599306].

The modules subdirs of tcllib are not included in the
default valid access path for safeBase, as they are not
inside the auto_path. So simple load of tcllib modules
isn't possible.

Workaround:
Add all needed tcllib modules subdirs to the accessPath
option of ::safe::interpCreate.

A decision should be made how safe interpreter support
is handled by tcllib.
User Comments: patthoyts added on 2004-03-03 05:32:14:
Logged In: YES 
user_id=202636

The new flat layout of packages in tcllib 1.4 has fixed this
issue.

gwlester added on 2004-03-03 05:32:07:
Logged In: YES 
user_id=121110

We can not reporduce the problem with the curent (1.5)
release of Tcllib.

andreas_kupries added on 2003-04-14 13:52:03:
Logged In: YES 
user_id=75003

Agreeing with Don. It is not the packages in tcllib which
have the problem per se, but the way tcllib as a whole is
installed.

A bad interaction between assumptions of the safeBase and
how tcllib installs itself. The problem is that the safebase
accepts (by default) only paths in auto_path _and_ their
_immediate_ subdirectories for packages. But tcllib installs
its packages in subdirectories of a subdirectory of a
directory in auto_path. 

So changing in the future to a flatter installation will
solve the problem. 
There are problems with doing so (see tcllib-devel mailing
list) for the upcoming tcllib 1.4, so this report will have
to keep open a while longer.

dgp added on 2003-04-14 06:34:47:
Logged In: YES 
user_id=80530


I disagree.  Each package should decide for
itself how to manage safe interps.  The most
tcllib should do is decide whether or not to
include a package if its safe interp management
is not acceptable.

I find it helpful to imagine whether a proposal
would make sense if the package was released
independently from tcllib.  If not, then it's probably
the wrong thing.