Like for 'is-loaded', register 'module-info loaded' modulefile Tcl
command as a module sub-command to make it reachable from the command
line. Sub-command is named 'info-loaded' for sake of efficiency (not
'module-info-loaded').
Add the new command to the existing shell completion scripts (bash, tcsh
fish, zsh).
Document new command in the module.1 man page.
Check 'info-loaded' command argument error in 071-args tests of 00-init
suite. Test 'module info-loaded' cannot be called from a modulefile with
151-module-onlytop in 50-cmds suite. Add 156-info-loaded tests in
70-maint suite to validate new sub-command.
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.
Closes#3
Like for 'append-path', register 'is-avail' modulefile Tcl command as a
module sub-command to make it reachable from the command line.
Add the new command to the existing shell completion scripts (bash, tcsh
fish, zsh).
Document new command in the module.1 man page.
Check 'is-avail' command argument error in 071-args tests of 00-init
suite. Test 'module is-avail' cannot be called from a modulefile with
151-module-onlytop in 50-cmds suite. Add 155-is-avail tests in 70-maint
suite to validate new sub-command.
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.
Like for 'append-path', register 'is-used' modulefile Tcl command as a
module sub-command to make it reachable from the command line.
Add the new command to the existing shell completion scripts (bash, tcsh
fish, zsh).
Document new command in the module.1 man page.
Check 'is-used' command argument error in 071-args tests of 00-init
suite. Test 'module is-used' cannot be called from a modulefile with
151-module-onlytop in 50-cmds suite. Add 154-is-used tests in 70-maint
suite to validate new sub-command.
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.
Like for 'append-path', register 'is-saved' modulefile Tcl command as a
module sub-command to make it reachable from the command line.
Add the new command to the existing shell completion scripts (bash, tcsh
fish, zsh).
Document new command in the module.1 man page.
Check 'is-saved' command argument error in 071-args tests of 00-init
suite. Test 'module is-saved' cannot be called from a modulefile with
151-module-onlytop in 50-cmds suite. Add 154-is-saved tests in 70-maint
suite to validate new sub-command.
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.
Like for 'append-path', register 'is-loaded' modulefile Tcl command as a
module sub-command to make it reachable from the command line.
Improve 'cmdModuleResurface' procedure to set a global 'g_return_false'
flag when 'is-loaded' command returns 0. If 'g_return_false' flag is set
shell code rendering will end with a false value returned.
Add the new command to the existing shell completion scripts (bash, tcsh
fish, zsh).
Document new command in the module.1 man page.
Check 'is-loaded' command argument error in 071-args tests of 00-init
suite. Test 'module is-loaded' cannot be called from a modulefile with
151-module-onlytop in 50-cmds suite. Add 153-is-loaded tests in 70-maint
suite to validate new sub-command.
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.
Closes#116
Refactor code to call from the module command line modulefile-specific
commands. These commands can only be called from the command line, not
when calling 'module' procedure from a modulefile, to avoid any
ambiguity.
When parsing command line arguments, check context to know if '-d' means
'--default' (avail command) or '--delim' (*-path commands).
Add the new commands to the existing shell completion scripts (bash,
tcsh, fish, zsh).
Document new commands in the module.1 man page.
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.
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.
Introduce MODULES_SILENT_SHELL_DEBUG environment variable to silent the
xtrace and verbose output on sh-kind shells.
When set (means MODULES_SILENT_SHELL_DEBUG=1), current xtrace and
verbose flags are saved then these shell properties are disabled. Once
execution is finished, saved setup is restored.
This mechanism is defined on initialization scripts, at the beginning to
silent, at the end to restore defined behavior. It is also defined
within the module function following exact same principle.
By default, xtrace and verbose shell properties are applied to module
function and initialization script if enabled in calling shell script or
interactive session. These properties are disabled in module context only
if MODULES_SILENT_SHELL_DEBUG is set to '1'.
Notice that if xtrace/verbose properties are set, shell code that
leads to disable them when MODULES_SILENT_SHELL_DEBUG is set will be
outputed as debugging is set during these operations.
The mechanism only applies to the SH-shell family.
Closes#121
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>.
With quarantine mechanism sh-kind init scripts or module function are
sensitive to IFS value. If space character is not part of IFS, eval
command will not be able to understand command-line string.
This commit add code in init scripts and module function to guaranty
correct value for IFS.
Test that the names of the environment variable defined in
MODULES_RUN_QUARANTINE are valid names.
Add test in quarantine setup code within init scripts (silent check) and
also test in modulecmd.tcl. The latter reports a warning if a bad name
is detected.
Add a non-regression test in modules.00-init and install.00-init test
suites.
As now a call to modulecmd.tcl defines the module function and
surrounding initial environment, this execution should also be shield
against bad environment with quarantine mechanism.
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.
Change from previous behavior where redirection were set if shell was
interactive. With this change, a 'sh script' command launched from a
terminal session will setup module stderr redirection whereas previously
it was not the case as script was not ran in interactive mode.
Shell interactive mode is useful to know that interaction will occur on
stdin (interesting for completion setup). Knowing session is attached to
a terminal seems to be the good pivot to adapt stdout or stderr
functioning (help to determine if PAGER mode can be enabled or not on
'git')
Use sed instead of perl in configure and Makefile scripts as perl is not
required anymore to build documentation. sed is a lighter requirement to
build and install software.
Introduce a version.inc file sourced by Makefiles, that holds release
number and build information. Makefiles use these information to set
correct version number in manpages and modulecmd.tcl script.
version.inc is present in dist tarball. This file is generated from
version.inc.in file by main Makefile when working in git repository.
Release information are retrieved from the tags of the git repository.
Release number corresponds to last git tag set. Build number is the
result of the 'git describe' command: this information helps to know
from what git branch and commit the current build is made of.
* remove incorrect references to apt-get
* use space instead of tabs
* normalize description messages reusing short sentences already made
for zsh completion
* fix function to filter module command output and only return
modulefile list not mixed with files
* simplify install process by removing need for a '.in' file (and fix
bash_completion install on the way)
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.
Introduce '--enable-compat-version' configure argument to configure and
build compatibility (C) version in addition to main version.
This compatibility version is located in the 'compat' directory, which
is automatically populated with 'c-master' git branch if we work in the
git repository.
'configure' script is adapted to run the compatibility version relative
configure script. Unknown command-line arguments are passed down to this
script, which raise error if these arguments are not known there either.
Some compatibility version configure script argument are also
incompatible in this dual installation mode, so an error is raised
(--enable-versioning for instance).
Build process will generate and install modulecmd-compat, module-compat.1
and modulefile-compat.4 from this compatibility version. 'compat' suffix
enables clear distinction with main version files.
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.
Remove the --enable-set-switchml, --enable-use-cver-dotmodulespath,
--with-cver-initdir, --with-cver-bindir and --with-cver-mandir configure
option that previously enabled to link Modules-Tcl installation to an
external Modules-C installation.
This change is an initial step toward a bundled installation of Tcl/C
versions, so the external linking support will transform into a dual
flavor installation.
Generate a shared 'Makefile.inc' file rather all 'Makefile's at
configure time. Avoid init/Makefile being rebuilt by initscript '%.in'
rules.
Correct 'all' rule typo in doc/Makefile.
Enforce '.modulespath' symlink creation when usecverdotmodulespath is
enabled.