Do Explorative Programming in tclsh with Readline Support
raimue at macports.org
Fri Sep 18 08:06:38 PDT 2009
On 2009-09-18 14:47 , Ryan Schmidt wrote:
> Leaving rlwrap out of it for the moment, I can run "tclsh" (or
> "tclsh8.4" or "tclsh8.5"). But as soon as I try to "source ~/path/to/
> macports_testing.tcl" I don't see the successful "1.0" message but
> can't read "workpath": can't read "portbuildpath": no such variable
> Can anybody help?
I can reproduce the problem here.
This error comes from the line 'package require port 1.0'. You can see a
backtrace in tclsh using 'set errorInfo'.
Unfortunately the interface of the port 1.0 package is not as clean as
it should be. Usually port 1.0 is required from macports::worker_init
where several variables are already in the global namespace, such as
portarchivemode (which is already set in the instructions on the wiki)
and portbuildpath. I do not have a list what else might be used, as it
would only be recognized once you run the specific command in this way
portbuildpath is used in lazy evaluation for the workpath variable,
which means it is required as soon as the first access to workpath
happens. The gsoc08-privileges added a read operation on workpath
causing the evaluation to happen and this lets the loading fail now.
I don't know what you want to do, as a quick workaround just do not
require port 1.0 for now.
More information about the macports-dev