Yeah, I am assuming a clean environment. When I started using modules, they
were very slow and I didn't want to have to wait 10 seconds for every shell to
start.
If you want modules to also be forced to load, I *think* you can just set the
g_force global variable to true. Try that (search for "set g_force 0" and
change to "set g_force 1"). If this is useful, we can talk where to go from
there.
-Mark
Mark Lakata, Staff Engineer 1225 Charleston Road voice 650-567-5170
MIPS Technologies Mountain View CA 94043 fax 650-567-5002
On Wed, 25 Jun 2003, Harlan Stenn wrote:
> > hmm. it seems you could just put your 'module' commands in any file of
> > your choice, and then source it from your .cshrc or .profile. It doesn't
> > require any change to the modulecmd.tcl. However, in practice, most users
> > have just one login shell that they will keep until the day they die, and
> > by inheritance, perl scripts and Makefiles will inherit the values from
> > the login shell.
>
> But you are assuming an RC environment that "sets it on login and leaves it
> alone", yes?
>
> I have seen too many places where some process in the chain will alter/clean
> the environment, and this Effects subsequent processes in a bad way.
>
> I had enough trouble with this over the years that I have simply decided
> that each shell invocation must explicitly set the correct environment.
>
> I have also seen problems with jobs started from crontabs (older crons do
> everything from /bin/sh).
>
> Yes, there are hacks to solve lots of these problems, but a more elegant
> solution would be better.
>
> I am trying hard to have a robust "mechanism" that is separate from the
> "policy" of how one uses the mechanism (eg, the policy of "set up modules
> once at login" v. "set up modules at each shell session").
>
> > The 'source' command was for sourcing internal module commands (ie
> > 'prepend-path'), not the external shell commands (ie module load
> > ....). Look at the init/ directory of the tcl release for an
> > example. There probably isn't a wide use for this command. I only put it
> > in there, because the init scripts for each shell were basically doing
> > what 'module' does for free when configuring MODULEPATH. Since MODULEPATH
> > is so inherent to modules, I didn't want to make a module for it, I just
> > wanted to prepend-path.
>
> Thanks - I'll take a look.
>
> H
> --
> > -Mark
> >
> >
> > Mark Lakata, Staff Engineer 1225 Charleston Road voice 650-567-5170
> > MIPS Technologies Mountain View CA 94043 fax 650-567-5002
> >
> > On Wed, 25 Jun 2003, Harlan Stenn wrote:
> >
> > > > I didn't even know these existed. I would tend to not entangle the code
> > with
> > > > these, since they just make things more complicated. I like to see all t
> > he
> > > > module hooks in one place (the .login/.profile ).
> > >
> > > > that said, there is a hidden feature in the modulecmd.tcl that lets you
> > > > "source" module-like commands without actually loading a module. I use
> > > > this in the initialization scripts for settings the initial MODULEPATH in
> > > > a shell independent manner.
> > >
> > > Details, please!
> > >
> > > The reason I asked about .modules and .modulesrc is that it seems much more
> > > elegant than per-shell-class RC files, which must be maintained in parallel
> > .
> > >
> > > The problem is that if one's module-stuff is in, say, the .cshrc, and one
> > > needs to have the correct environment in any other language (Makefile, shel
> > l
> > > script, perl script, etc) then one has to maintain the module-stuff in all
> > > of those RC files.
> > >
> > > It seems much cleaner to have these "shell"-specific module init things
> > > access a single, shared RC file for all of the modules-stuff.
> > >
> > > H
> > > ---
> > > > On Tue, 24 Jun 2003, Leo Butler wrote:
> > > >
> > > > > Harlan Stenn wrote:
> > > > >
> > > > > > So what is the story with .modules and .modulesrc?
> > > > > >
> > > > > > The code and docs disagree, and I wonder what way
> > > > > > folks are heading.
> > > > > >
> > > > > > I would like to start adding support for this into
> > > > > > modulecmd.tcl, but I'm not sure which way to go.
> > > > >
> > > > > Hi Harlan,
> > > > >
> > > > > We don't use it, never have; there's something in the
> > > > > newer mail archives about it. I can look in the old
> > > > > archives to see if there's anything about these files
> > > > > that might be of use here.
> > > > >
> > > > > Sorry, I'm not of much help on this one.
> > > > >
> > > > > - Leo
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > -------------------------------------------------------
> > > > > This SF.Net email is sponsored by: INetU
> > > > > Attention Web Developers & Consultants: Become An INetU Hosting Partner
> > .
> > > > > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission
> > !
> > > > > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> > > > > _______________________________________________
> > > > > Modules-interest mailing list
> > > > > Mod...@li...
> > > > > https://lists.sourceforge.net/lists/listinfo/modules-interest
> > > > >
> > >
>
|