Take into account Modules initialization configurations found in ``etc``
directory if they exist rather in ``init`` directory. If ``initrc``
configuration file is found in ``etcdir`` then it is preferred over
``modulerc`` file in ``initdir``. Following the same trend,
``modulespath`` configuration file is found in ``etcdir`` then it is
preferred over ``.modulespath`` file in ``initdir``.
Add the ability to control whether or not code to support quarantine
mechanism should be added to the module function and initialization
scripts. Enabled by default
Fixes#167
Make compatibility module function to always return a value to be able
to check function result either new main version or compat version is
called.
Adapt cmake, perl, python and ruby compat module function to return a
true value. Always true is returned as compat version does not handle
returning error exit code.
Add --with-quarantine-vars configure option to define quarantine
mechanism configuration at build time.
Value passed to the configure option will be used by Makefile to
initialize in the various initialization scripts the
MODULES_RUN_QUARANTINE variable and eventual MODULES_RUNENV_<VAR>.
Make use of autoinit module command to initialize module command and its
initial surrounding environment (default value for MODULESHOME,
MODULEPATH, LOADEDMODULES and parse of init/.modulespath).
Then if compatibility version is currently activated redefined the
module command to point to the compat binary. But the compat version
will benefit from the surrounding environment initialization made by
autoinit.
With this change, activated compatibility version will also get its
environment initialized by the init/modulerc file whereas before this
change only the main version was affected by this setup file.
Introduce MODULE_USE_COMPAT_VERSION environment variable to control the
activation of the compatibility version rather main version in case of
--enable-compat-version installation.
The initialization script of the shells supporting compatibility version
are adapted to define the 'module' command based on the modulecmd-compat
binary if MODULE_USE_COMPAT_VERSION is set to 1. Elsewhere module is
based on modulecmd.tcl.
'switchml' function of alias is reintroduced to switch between main and
compatibility version based on the state of the
MODULE_USE_COMPAT_VERSION environment variable.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.