With same behavior than on compatibility version. The list of the
environmet variables that are cleared by this sub-command has been
updated to match the recent development (MODULES_LMPREREQ, ...)
Fixes#203.
During an additional evaluation triggered by an automated module
handling mechanism, ensure warning and error messages are reported under
the message block of the main evaluation.
Add a 'recordtop' argument to the reportWarning and reportError
procedures in order to indicate that the message should be recorded
under the top-level message block instead of the currently active
message block.
Fixes#252.
Add a cookbook section in the documentation and port there the 3
pre-existing recipes: inhibit-report-info, top-priority-values and
unload-firstly-loaded.
Move the examples files of these recipes from contrib/cookbook to
doc/example directory.
Make 'is-loaded' modulefile command callable from a modulerc
interpretation. Restore this way the behavior of compatibility version.
Update diff doc and add some specific non-regression tests in 20/060 and
50/380.
Fixes#207
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
Adapt getPathToModule procedure to only look at the loaded module list
when searching a module to unload. If passed module not found in this
situation does not produce an "Unable to locate modulefile" issue.
So unloading an unexistent modulefile does not produce an error anymore,
as it was the case on compatibility version.
Moreover switching from an unexistent modulefile to another modulefile
does not produce the "Unable to locate modulefile" error and new module
load is attempted. Compatibility version does not walk in this situation
as on this version module to unload must be loaded elsewhere an error is
triggered.
Adapt testsuite and diff document.
Fixes#199
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
* Requirement Load (ReqLo)
* Dependent Reload (DepRe)
* Useless Requirement Unload (UReqUn)
* Dependent Unload (DepUn)
Mention these mechanism titles in MIGRATION and module man page
documentations.
Reword code and tests that where previously using the DU/DR/URU short
names.
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
Update documentation for module usage on scripting language like Perl or
Python to provide examples where arguments are passed as a list of
string rather a single string.
For compatibility with previously advertised examples, first argument is
splitted if multiple word are detected in it.
Describe the difference behavior between Modules 4+ and compatibility
version regarding how append-path/prepend-path commands handle the
MANPATH environment variable when unset. Helps clarify [1].
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1564899
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.
Quote autoinit result for eval interpretation on SH-kind shells to
avoid parameter expansion to randomly occur on generated code
depending on file or directory names of current working directory.
Test basic module commands in install testsuite with a
'something (test)' file existing in current working directory.
Fixes bug reported at [1].
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1549664
As for the PAGER environment variable, do not consider anymore the LESS
environment variable for Modules pager configuration in order to avoid
side effects coming from a general pager configuration not compatible
with Modules pager handling.
Previously when LESS was spotted defined, default paging command options
were blanked if default pager was 'less'. With this change, even if LESS
environment variable is defined, default paging command options are
still taken into account.
Adapt doc and tests accordingly.
Complements #146
Do not consider anymore the PAGER environment variable for Modules pager
configuration in order to avoid side effects coming from a general pager
configuration not compatible with Modules pager handling.
This change makes Modules pager implementation moving away from Git
pager implementation (which was taken as reference to model configuration
behavior of Modules pager). Git is able to withstand any pager
configuration, especially to quit pager if content fits in one screen.
Not the case with our implementation currently, so it is safer to only
take into account pager configuration that is specific to Modules.
Adapt doc and tests accordingly.
Fixes#146
If no sphinx-build found, warn user but still make it possible to build
and install Modules (without the documentation).
Enables to install Modules from git repository for test purpose on
systems where python-sphinx is not available in regular pakage
repositories.