Remove the '-' character from the list of extended default separator
characters, as it is not feasible to determine in all cases the highest
version specified after this character (to determine an implicit
default). This removal means that only '.' is taken into account as
extended default separator.
system modulefile command is intended to the command passed to it trough
shell, like done on compatibility version.
So update system procedure to find correct shell on the current platform
and run command through it.
Doing so, shell commands with backticks for instance are correctly run.
Fixes#205
fixed linelength and tabs/spaces
adding set-function/unset-function documentation
adding tests for set-function/unset-function
fixed failing test for function modulefile additions
Magic cookie at the beginning of modulefiles may sometimes set a version
number, for instance '#Module1.0'. Until now this version number was
about a modulefile standard version. However there is no known
modulefile API versioning and new modulefile commands are added along
new Modules releases.
So the idea here is to match this version number optionally set on magic
cookie and compare it to the modulecmd.tcl release version. If
modulefile sets a version number greater than modulecmd.tcl version,
this modulefile is not evaluated like when no magic cookie is set at
all.
Add specific tests in 20-locate suite and adapt modulefile man page and
MIGRATING doc.
Fixes#171
Clarify modulefile man page and .version modulerc interpretation about
ModulesVersion variable which can only refer to modulefile located in
the same directory than where this .version modulerc file is located.
Report error if a nested ModulesVersion value is detected. This value is
ignored.
Add tests in 80-deep suite on that change.
Clarifies RH#979787 [1]
Fixes#176
[1] https://bugzilla.redhat.com/show_bug.cgi?id=979787
Allow to define value to return if variable name passed to the getenv
procedure is undef.
Add a description of 'getenv' command in the modulefile man page.
Remove path entry in environment variable by passing an index rather a
string. String at specified index in content list is removed if coherent
with relative reference counter.
Let the possibility to append or prepend path element entry to a
variable even if this entry is already registered into the variable
which introduces duplicates element within the variable value.
Entries are added with eventual duplication by the use of the
--duplicate option on append-path and prepend-path commands. These
additions increment the reference counter as usual.
Removal of duplicated path entry depends on the reference counter value.
Entries are not removed unless reference counter value is lesser than
the number of duplicated entries.
Enable append-path, prepend-path and remove-path to receive multiple
path value arguments.
Add some non-regression tests for modulefile or sub-command cases.
Update modulefile.4 and module.1 docs.
Closes#141
Detect if path string passed to append-path, prepend-path or remove-path
commands is composed of multiple path entries (separated by specified or
default delimiter string). In this situation add/remove each path
separately to correctly update relative reference counter.
Add some non-regression tests for modulefile or sub-command cases.
Update modulefile.4 doc.
Closes#142
Returns true when no argument is passed to 'is-used' if any directory
is used, whatever it is.
Adapt docs and test cases to this new behavior.
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#144
Returns true when no argument is passed to 'is-saved' if any collection
matching currently set collection target exists whatever this collection
is.
Adapt docs and test cases to this new behavior.
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.
Returns true when no argument is passed to 'is-loaded' if any modulefile
is loaded, whatever it is.
Adapt docs and test cases to this new behavior.
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.
Add 'loaded' sub-command to the 'module-info' modulefile Tcl command.
This new sub-command returns name of the modules currently loaded
corresponding to the name passed as argument. May return multiple
modules if passed name matches more than one loaded modules.
Document new command in modulefile.4 and test it with a 285-info-loaded
tests in 50-cmds suite.
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 'is-avail' modulefile command to check, following the same
spirit than 'is-loaded', if any of the passed modulefiles exists in
enabled in MODULEPATH.
Document new command in modulefile.4 and test it with a 322-is-avail
tests in 50-cmds suite.
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 'is-used' modulefile command to check, following the same
spirit than 'is-loaded', if any of the passed directories has been
enabled in MODULEPATH.
Document new command in modulefile.4 and test it with a 321-is-used
tests in 50-cmds suite.
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 'is-saved' modulefile command to check, following the same
spirit than 'is-loaded', if any of the passed collections exists.
Document new command in modulefile.4 and test it with a 320-is-saved
tests in 50-cmds suite.
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.
Transform source documents from POD format to reStructuredText to then
benefit from Sphinx documentation framework and Read The Docs publishing
capabilities.