Append major.minor version number to the #%Module header prefix of
generated cache files. Cache file can be used only if generated for the current
release of Modules used.
Change cache.tcl into cache.tcl.in to get Modules release number
resolved at build time.
Implement cacheclear sub-command. For each modulepath enabled, check
module cache file exists. If yes and if modulepath is writable for user,
try to delete the cache file.
Report message block is used to report file deletion. Reports are output
in normal verbosity level or higher. A warning message is emitted if
modulepath is not writable for user.
Add tcl/cache.tcl source file to store procedure related to cache
mechanism. Update Makefile to properly generate modulecmd.tcl with this
new tcl file.
This reverts commit 59ac24e243.
FPATH variable cannot be handled within autoinit process as this is not
an environment variable. Thus when modulecmd.tcl is executed, it does
not know the current value of FPATH. So if it sets FPATH during
autoinit, previous value of this variable is lost. As a result FPATH
must stay defined in initialization script.
Use install command rather mkdir or cp to apply regular file mode when
installing Modules. A specific umask configuration set in the current
environment will not impact modes set on installed files.
Follow same approach than Makefiles generated by autotools, with an
INSTALL Makefile variable.
Add --nagelfardatadir and --enable-nagelfar-addons installation option
to control whether or not Modules-specific Nagelfar files need to be
installed and in what location.
Introduce the --with-tcl-linter-opts configure option to choose at
installation time the options to pass to the tcl linter program. Default
option is ''.
Introduce the --with-tcl-linter configure option to choose at
installation time the default program command to use to lint
modulefiles. Default Tcl linter is 'nagelfar.tcl'.
Add zsh FPATH setup in autoinit command instead of zsh shell
initialization script. This way all the shell setup is gathered in the
autoinit process. What is left in initialization script is the code to
properly call the autoinit process.
Fixes#462.
Add shell completion setup in autoinit command instead of shell
initialization scripts. Use this way one modulecmd.tcl internal code
instead of shell code for every shell having some completion to source
(bash, tcsh, fish).
Fixes#462.
Add MANPATH setup in autoinit command instead of shell initialization
scripts. Use this way one modulecmd.tcl internal code instead of shell
code for every shell requiring to setup MANPATH with Modules binaries
location (sh, bash, ksh, zsh, csh, tcsh, fish).
Fixes#462.
Add PATH setup in autoinit command instead of shell initialization
scripts. Use this way one modulecmd.tcl internal code instead of shell
code for every shell requiring to setup PATH with Modules binaries
location (sh, bash, ksh, zsh, csh, tcsh, fish).
Fixes#462.
Update Makefile to call git command only if the version.inc file needs
to get rebuilt (if it does not exist or if the git repository has been
updated after version.inc built).
Include version.inc file in main Makefile only if its variables have not
been just generated within Makefile flow.
The Makefile script in the init directory does not depend on the
definitions stored in the version.inc file. So remove inclusion and
requirement definition to this version.inc file in init/Makefile.
Add an utility library that supersedes the sysconf function from libc.
The sysconf function from this added library always returns an error
(-1). It is used for coverage test of the sysconf call made within the
Envmodules_InitStateUsergroupsObjCmd function of the Tcl extension
library.
Remove entirely the work on the noglob_eval_shells option as enclosing
in quotes the generated output of modulecmd.tcl to pass it to the eval
command is equivalent to disable the pathname expansion mechanism of
sh-kind shells.
Introduce the --with-noglob-eval-shells configure option to choose at
installation time if the pathname expansion should be disabled or not in
the module function to evaluate shell code produced by modulecmd.tcl,
for the shells listed in option value.
Generate the silent_shell_debug code in module shell function during the
autoinit processing if the silent_shell_debug configuration option is
enabled.
Choice made at installation time may now be updated later on with the
silent_shell_debug configuration option. If enabled prior calling
autoinit (or enabled within initrc configuration file), the silent shell
debug code will be included in module shell function.
Convert the --enable-quarantine-support installation option in a
quarantine_support configuration option. When this option is enabled the
autoinit sub-command produces the module shell code with quarantine
mecahnism support. When disabled, code is generated without quarantine
support.
This way decision to have or not the quarantine mechanism code can also
be made in initrc configuration file. As a result
--enable-quarantine-support installation option new controls the default
behavior to generate or not the quarantine code, but this could now be
superseded in initrc configuration file.
Different setup cases are foreseen:
1. quarantine code has been included in module shell function, then
quarantine_support config is disabled
> config disablement is not effective as shell code is already set
2. quarantine code has not been included in module shell function,
then quarantine_support config is enabled
> config enablement is not effective as shell code is already set
3. during module initialization, quarantine_support config is enabled in
initrc
> shell code generated with quarantine code
4. during module initialization, quarantine_support config is disabled
in initrc
> shell code generated without quarantine code
5. during module initialization, quarantine_support config is enabled by
default or via env
> shell code generated with quarantine code
6. during module initialization, quarantine_support config is disabled by
default or via env
> shell code generated with quarantine code
modulecmd.tcl has been split in the repository in several tcl files
located in the tcl/ directory. This change has been done to make code
editing easier.
modulecmd.tcl is still shipped as a single executable script to ensure
best performances. This single script is made by joining all the tcl
files from tcl/ directory.
An alternative approach has been tested where modulecmd.tcl auto loads
the procedure located in external tcl files. But a performance overhead
was observed. So it has been decided to split code to edit sources but
still build and ship a standalone modulecmd.tcl script.
Only look at configuration files found in the location designated by the
'--etcdir' or '--initdir' option (depending on the value of
'--with-initconf-in' option). Configuration files were previously
searched in both locations.
createmodule.sh and createmodule.py scripts are superseded by the
`sh-to-mod` sub-command that supports conversion from more shell
languages (ksh, zsh, fish, csh) and handles more environment changes
(alias, shell function).
Introduce the --with-editor configure option to choose at installation
time the default editor command to use to interactively edit
modulefiles. Default editor is 'vi'.