Now getAbsolutePath procedure, which make a path passed as argument an
absolute path, check the current path of the interpreted modulefile or
modulerc rather always taking the current path of the module command
execution.
So a modulefile or modulerc can use relative paths based on a
determistic way as it is now based on their location. Previously it was
not possible as relative paths were dependent of the location from where
the module command was executed.
If ModulesCurrentModulefile variable is not empty, getAbsolutePath nows
it is called during a modulefile/modulerc interpretation, so it takes
the directory name of this ModulesCurrentModulefile as current working
directory.
When a modulefile loads or unloads another modulefile, load or unload
issue did not previously led to upper module load or unload failure. As
a result, the upper modulefile appeared loaded or unloaded whereas its
dependent sub-modulefile were not loaded or respectively still loaded.
This commit makes cmdModuleLoad and cmdModuleUnload procedure return an
exit code to let know if load or unload action performed correctly. In
case of a 'module load' or 'module unload' call within a modulefile, the
module procedure will raise an error with the dummy message
'SUB_FAILED'. This message is caught at the result of the modulefile
interpretation to return an error code, without raising error count or
message as it has already been handled at the root of the issue.
When mode is set to unload, 'module load' commands in modulefile are
interpreted as 'module unload' commands. To guaranty correct behavior
regarding requirements, the module list passed to the load command is
reversed to get and unload of the modulefiles in the reverse order than
load.
This is the same behavior than applied on purge or restore commands,
where loaded module list is reversed to be unloaded.
Add non-regression tests in 150-module of 50-cmds suite to check load
and unload of meta-module works correctly over time.
fly, as it were. It's a powerful mechanism for dynamically changing
environment variables, aliases, X11 resources, etc.
It uses an embedded Tcl intrepretor, with a few extensions. Therefore,
it has a well defined language syntax.
Version 3.1 is GPL, and includes many improvements over the 3.0beta.