Re: rivet tcl auto_path

2007-09-27 Thread Massimo Manghi


I believe the answer to this question must be found
in the way extensions are loaded by tcl.  The problem
still exists in various cases:

- for developers wanting to have more rivet installations
to switch from a module version to another without
reinstalling the whole set of libraries (the current scripts
in 'trunk' copy everything in /usr/lib/rivet and don't handle
this case)

- It might also be a problem for users who compile
and install the module on their own if they don't remove
a previous release's directory.

-- Massimo

Massimo Manghi wrote:
Hi, 

what is the way by which the module understands where 
the tcl code is located? I'm trying to figure out

how the module determines the path to the init.tcl
script when calling

if (Tcl_PkgRequire(interp, RivetTcl, 1.1, 1)) {
...
}

For example: on my system the 1_0 is labeled as 0.7.0
in configure.ac, still after apache is started
auto_path had /usr/lib/rivet0.5.0 (from another installation). 
Since I found no erroneous references to that version 
number in the code I simply wiped out the /usr/lib/rivet0.5.0 
directory, restared apacheet voila...the /src/lib/rivet0.7.0 
got into the auto_path. Is it a magic of Tcl_PkgRequire?


-- Massimo

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: help installing 0.5.0

2007-09-27 Thread David Welton
On 9/26/07, Drew [EMAIL PROTECTED] wrote:
 The INSTALL file that comes with 0.5.0 still says:

Hi,

You don't want 0.5.0, you want the 1_0 branch from subversion.

-- 
David N. Welton
http://www.welton.it/davidw/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: rivet tcl auto_path

2007-09-27 Thread Massimo Manghi

Valery Masiutsin wrote:

Hello, Massimo !

If you are runing different versions of rivet simultaneously, and they
keep same versions of packages  inside auto_path, you have to either
change their numbering and go with strict 'package require blah
version' (on Tcl or on C level does not matter), or you have to do
some tricks with auto_path to exclude pathes searching of which could
cause the problem.

Regards Valery.

  
Yes, like inserting the specific path as first element in auto_path, 
which is done
by init.tcl, which is in /usr/lib/rivetx.x.x/ . It fetches the directory 
name

from the directory where it was placed. If this is wrong the whole set
of rivet commands have the wrong rivet directory in auto_path.
Removing the package version from the directory name from the code
in 'trunk' might have been a way to cope with this problem (anyone out
there can recall why?), but raises a problem in the 2 cases I described.
A possible way to get around this might be manipulating auto_path at the
C level before init.tcl is run.

-- Massimo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]