> > Would it be a good idea to either completely remove .modulesbeginenv
> > from the code or to make it "optional"?
> >
> > Leo, how did you get rid of it?
>
> Heh-heh... I simply failed to ever tell anyone about using
> it.
Nobody here knows about it either. The problem is that we also use a
modulefile that specifies a bunch of modulefiles, and the .modulesbeginenv
seems to "remember" what has been loaded; when we change something in the
master modulefile it doesn't get picked up by new shells, apparently because
of something in the .modulesbeginenv file. As we are also in a multi-OS
environment (I was careful to keep the paths the same on all OSes) the
original problem never bit us, but that's different now.
> ... which cleans out any env vars that might other-
> wise get appended to and then resets their environment using
> the *_VER variables (SYNOPSYS_VER, VIM_VER, etc.) that we
> set in each modulefile.
We don't do anything like that...
> We load default versions of all necessary tools on a per-
> project basis with a "modulefile of modulefiles" that sets
> default versions of tools using these *_VER vars *if* they
> weren't set already. If set, the version pointed to by the
> variable is loaded. So we get a clean version of the current
> environment, not the original environment. Hope this made
> sense...
I think so - I could convert to this pretty easily I think. I am still
missing a few bits of your implementation though. Can you publish a
complete example?
> The .modulesbeginenv file is not deleted, but goes unused.
> I would indeed recommend that we eliminate it from modules
> and find some other mechanism to reset the environment.
I am happy to remove the code that deals with .modulesbeginenv from the C
code if that will help.
I don't fully understand about the env reset, though.
H
|