Opened 17 years ago

Closed 15 years ago

#14537 closed defect (invalid)

tclsh does not have /Library/Tcl in its path

Reported by: shreevatsa.public@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc:
Port:

Description

The Tcl from MacPorts does not seem to have /Library/Tcl in its path, which, ironically, makes it harder to work with MacPorts. (For "package require macports", etc.)

Example:

$ echo 'puts $auto_path' | /opt/local/bin/tclsh
/opt/local/lib/tcl8.5 /opt/local/lib
$ 
$ echo 'puts $auto_path' | /usr/bin/tclsh
/System/Library/Frameworks/Tcl.framework/Versions/8.4/Resources/Scripts /System/Library/Frameworks/Tcl.framework/Versions/8.4/Resources /usr/lib ~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks

Change History (7)

comment:1 Changed 17 years ago by raimue (Rainer Müller)

MacPorts' /opt/local/bin/port loads /Library/Tcl/macports1.0/macports_fastload.tcl explicitely. So this should not be a problem.

As you compared to Apple's tclsh: Which of these paths should be added besides /Library/Tcl?

comment:2 Changed 17 years ago by shreevatsa.public@…

Sorry, I don't know anything about Tcl; I don't know what paths should be added or to what variable (or else I would have submitted a patch instead :-)), but adding /Library/Tcl to auto_path seems to be sufficient to do "package require macports" in a Tcl script.

comment:3 in reply to:  description Changed 17 years ago by afb@…

Replying to 14537:

The Tcl from MacPorts does not seem to have /Library/Tcl in its path, which, ironically, makes it harder to work with MacPorts. (For "package require macports", etc.)

Normally one uses /usr/bin/tclsh (system version) for MacPorts ?

For instance Perl and Python doesn't include system paths either...

comment:4 Changed 17 years ago by shreevatsa.public@…

Yes, I can use the system version (or use the full path when loading a package).

If it is MacPorts policy not to include system paths, then I guess this is an invalid bug, and can be closed. (I don't see the reason for the policy, though.)

comment:5 Changed 17 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to mww@…

Assigning to maintainer.

comment:6 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:7 Changed 15 years ago by tobypeterson

Resolution: invalid
Status: newclosed

Closing as invalid - we avoid system paths intentionally

Note: See TracTickets for help on using tickets.