Report procedure call in addition to other debug messages through the
`debug2` verbosity level rather the `trace` level (that is preserved for
another task).
When -D/--debug option is set multiple times, `debug2` mode is set.
Introduce the `caller` argument to the reportDebug procedure to get the
ability to define the calling procedure name to report. This argument is
especially used by the initial reportDebug procedure set prior report
initialization, to send toward final reportDebug procedure the actual
caller name.
Add the --nearly-message option on module-forbid command to enable set
of specific additionnal error message when an attempt to evaluate a
*nearly forbidden* module is made.
When defined, record message as a property of the nearly-forbidden tag.
Produce a warning message when a module with *nearly-forbidden* is
evaluated. Message produced indicate the date time starting when module
will effectively be forbidden.
Update parseApplicationCriteriaArgs procedure to get a *near range in
seconds* as first argument, then determine in this procedure if the
*after* criteria is near. Add this information and the *after* criteria
value to the list of returned values.
With these new informations, the *nearly-forbidden* tag is set in
module-forbid for module specification that are close to reach the
*after* limit defined.
Introduce the `nearly_forbidden_days` configuration to determine the
number of days a module should be considered *nearly forbidden* prior
reaching its expiry date set by `module-forbid` modulefile command.
Default value for this option is obtained from
--with-nearly-forbidden-days configure option, which is set to 14 days
by default.
Configuration value can be superseded by use of
MODULES_NEARLY_FORBIDDEN_DAYS environment variable.
Add the ability to validate a configuration value against a value class
(integer, string, ...) rather a list of accepted values. See list of
accepted class names on Tcl `string is` command.
Introduce the --with-nearly-forbidden-days ./configure script option to
define the number of days a module is considered nearly forbidden prior
reaching its expiry date limit set by module-forbid command.
Add the --message option on module-forbid command to enable set of
specific additionnal error message when an attempt to evaluate a
forbidden module is made.
When defined, record message as a property of the forbidden tag.
Adapt setModspecTag/getModuleTag/isModuleTagged procedure to give the
ability to set a list of properties for a tag. Add getModuleTagProp
procedure to retrieve the properties associated to recorded tag.
When a module has been tagged forbidden, disallow its evaluation by
transforming modulefile path location result in an `accesserror` entry.
As evaluation is concerned, it only has an impact on modulefile or
virtual modules. Directories, alias or symbolic version are not impacted
thus still used to resolve path to modulefile and virtual module even if
tagged forbidden.
Do not imply hiding specified module on `module-forbid` command. Just
record module specification is said *forbidden* which will be checked to
disallow module load.
Doing so, hiding module is now only done through `module-hide` command
and the previous behavior of `module-forbid` command can now be achieved
with `module-hide --hard` + `module-forbid`.
This change also enables to forbid use of modules that are visible.
Hard-hiding level is lowered to *2*, as this spot was left empty through
this change.
Add the setModspecTag procedure to record defined tag over a module
specification.
getModuleTag procedure enables to retrieve all the tags applying to a
module passed as argument.
isModuleTagged procedure returns whether or not given module has given
tag set on it.
Rework getModules procedure to get the defined default version from the
fetched symbolic version target available in found_list structure rather
querying g_resolvedPath global structure. Doing so, hidden default are
automatically dropped.
Hidden statements can only target declared symbolic versions and not
those automatically defined (@default and @latest). Thus when a declared
`default` or `latest` symbol is set hidden, an auto-symbol is
automatically defnied instead (targeting highest module version
available).