To launch tests from path containing specific chars (with special
meaning in regular expressions) to ensure expected results from test
cases are correctly escaped.
Introduce the ability to control the module search match. Search query
string should match module name start or any part of module fully
qualified name. Default search match behavior is set at ``./configure``
time with the ``--with-search-match`` option. It could be superseded
with the ``MODULES_SEARCH_MATCH`` environment variable, that could be
set with ``config`` module sub-command through the ``search_match``
option. Command-line switches ``--starts-with`` (``-S``) and
``--contains`` (``-C``) for ``avail`` module sub-command enable to
supersede defined search match configuration.
Match search query at corresponding search depth level when indepth mode
is disabled without implying that search query matches beginning of
module names. This is a preparatory work to a search match option where
query could be contained in module name and not only be the start of
module name.
As some results from findModules are removed through the process of
getModules, update element list of directories to fit results.
Fix argument parsing for the `append-path`, `prepend-path` and
`remove-path` modulefile commands to consider every arguments found
after the variable name as variable values and not command option even
if argument starts with `-` character.
Fixes#278.
Right trim '#' characters from the fetched modulefile magic cookie
string to ensure a correct compatibility version comparison. Useful when
modulefile first line is equal to '#%Module4.3##############'.
Thanks to Eric Deveaud for the issue report.
Add to the configure script the --with-locked-configs option to ignore
environment variable superseding of Modules configurations defined in
modulecmd.tcl script. Lockable configuration option are extra_siteconfig.
Currently locked options are reported through the locked_configs option
on the config sub-command.
This new configure option replces --enable-extra-siteconfig which was
dedicated to the control over the MODULES_SITECONFIG variable.
When performing a 'module restore', forcibly enable the implicit_default
option to correctly match current state against the collection to
restore, even if this collection was saved with implicit_default enabled
and current setup at restore time has this option disabled.
implicit_default is then restored to its defined value once the match
is over. So the load of a module to restore from the collection may fail
when implicit_default is disabled if this module is an implicit default
and collection was saved with implicit_default enabled.
Add the ability to configure whether an implicit default version should
be defined for modules with no default version explicitly defined. When
enabled, which stays the default behavior, a module version is
automatically selected (latest one) when the generic name of the module
is passed. When implicit default selection is disabled, the name of
modules to evaluate should be fully qualified elsewhere an error is
returned. This option is set at `./configure` time with the
`--enable-implicit-default` and `--disable-implicit-default` options. It
could be superseded with the `MODULES_IMPLICIT_DEFAULT` environment
variable, that could be set with `config` module sub-command throught the
`implicit_default` option.
When implicit_default is disabled:
- module implicit default versions are excluded from 'module avail -d'
results.
- false is returned when argument passed to the 'is-avail' sub-command
is a directory without an explicit default set in it.
- and auto_handling is enabled, the requirement load mechanism will fail
on requirement relying on module implicit default version
Fixes#179.
Add the report_issue argument to the getPathToModule procedure to
inhibit the report of issue raised during the search and resolution of a
passed module name.
Issue report is unwanted when performing a reverse lookup of the module
names resolving to a known modulefile (like done in procedures
getSimplifiedLoadedModuleList and getAllModuleResolvedName).
Issue report is also disabled in cmdModuleSearch, as found issues are
reported later on through the list returned by the getPathToModule call.
Add the ability to configure when unloading a module and multiple loaded
modules match request if firstly loaded module should be choosen or
lastly loaded module. Default behavior is set at the `./configure` time
with the `--with-unload-match-order` switch. This default could be
superseded with the `MODULES_UNLOAD_MATCH_ORDER` environment variable,
that could be set with `config` module sub-command throught the
`unload_match_order` option.
This change allows to restore behavior of Modules compatibility version
where first matching module in loaded module list were unloaded in such
situation.
By default, lastly loaded module is set for unload (like it was
before this change) to limit impact on the loaded module list when
dependencies are woven between these loaded modules.
Even if this change enables to change the default behavior, it is highly
recommanded to keep it as soon your modulefiles express dependencies
between each other.
Fixes#198.
Provide a bare siteconfig.tcl in designated etcdir at installation time
if no pre-existing site-specific configuration file is found at
designated location.
Add to the configure script the `--enable-extra-siteconfig` and
`--disable-extra-siteconfig` options to allow or forbid the definition
of a site-specific configuration script controlled with the
`MODULES_SITECONFIG` environment variable.
These options control the default value of the `g_extrasiteconfig`
variable in `modulecmd.tcl`. If this variable is true (by default),
MODULES_SITECONFIG is looked at the siteconfig sourcing time. Thus the
primary siteconfig.tcl can set the variable to false to ensure the
extra siteconfig is disabled whatever the option passed at ./configure
time.
When just a configuration key name is passed to the 'config' sub-command
(and no value associated to it) just report this configuration key value
rather reporting all configuration keys.
When the '--reset' command-line switch and a configuration key name is
passed to the 'config' sub-cmd, unset the relative environment variable.
Ensure this configuration key could be altered.
When a configuration key name and value is passed to the 'config'
sub-command, set the relative environment variable with passed value.
Ensure on the way that configuration key name can be altered with an
environment variable and that passed value is valid.
Report the list of the environment variables related to Modules in an
additionnal table displayed on the --dump-state action of the 'config'
sub-command.