doc: desc. haveDynamicMPATH modulefile command

Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
This commit is contained in:
Xavier Delaruelle
2025-05-10 19:34:38 +02:00
parent d95e229950
commit 2e28703378
4 changed files with 27 additions and 3 deletions

View File

@@ -151,6 +151,7 @@ Modules 5.6.0 (not yet released)
* Add :subcmd:`disable` sub-command, an alias of :subcmd:`saverm`
* Add :subcmd:`describe` sub-command, an alias of :subcmd:`saveshow`
* Add ``--show_hidden`` option, an alias of :option:`--all`
* Add :mfcmd:`haveDynamicMPATH` modulefile command
.. _Security policy: https://github.com/envmodules/modules/blob/main/SECURITY.md
.. _Modules chat room: https://matrix.to/#/#modules:matrix.org

View File

@@ -1092,7 +1092,7 @@ The following modulefile Tcl commands appeared on Modules 5.
| | :mfcmd:`lsb-release` |
+------------+-----------------------------------------------------------------+
| 5.6 | :mfcmd:`depends-on-any`, :mfcmd:`module-help`, |
| | :mfcmd:`module-warn` |
| | :mfcmd:`module-warn`, :mfcmd:`haveDynamicMPATH` |
+------------+-----------------------------------------------------------------+
:mfcmd:`system`, :mfcmd:`is-used`

View File

@@ -351,6 +351,21 @@ the *modulefile* is being loaded.
Option ``--return-value`` added.
.. mfcmd:: haveDynamicMPATH
:mfcmd:`haveDynamicMPATH` command signals that a modulefile modifies the
:envvar:`MODULEPATH` environment variable. It is useful when the modulefile
conditionally updates :envvar:`MODULEPATH` and is processed by Lmod tool.
Here in the Modules tool, this command is implemented as a *no-operation*,
since the :subcmd:`spider` sub-command evaluates the modulefile in the
context of the current user to determine whether :envvar:`MODULEPATH` is
updated.
.. only:: html
.. versionadded:: 5.6
.. mfcmd:: hide-modulefile modulefile
Alias of :mfcmd:`module-hide` command.
@@ -2195,6 +2210,13 @@ The ``remove-property`` and ``extensions`` modulefile commands are evaluated
as a *no-operation* command. No error is obtained if these commands are used
in modulefiles but no change occurs.
The :mfcmd:`haveDynamicMPATH` is evaluated as a *no-operation* modulefile
command. If modulefile conditionally updates :envvar:`MODULEPATH` environment
variable, this command is needed to help Lmod know that modulefile changes
:envvar:`MODULEPATH`. :subcmd:`spider` sub-command on Modules does not need
this information as modulefile is evaluated in the context of the current
user to determine whether :envvar:`MODULEPATH` is updated.
The :mfcmd:`break` command does not accept any argument. A ``msg`` argument
can be set on Lmod to provide a customized break error message.
@@ -2256,7 +2278,8 @@ the dependent module will get automatically reloaded.
.. versionadded:: 5.1
.. versionchanged:: 5.6
Modulefile command :mfcmd:`add-property` implemented
Modulefile commands :mfcmd:`add-property` and :mfcmd:`haveDynamicMPATH`
implemented
.. _Shell support:

View File

@@ -114,7 +114,7 @@ the end of this section to map these equivalents.
* - Lmod 8.8
- Modules 5.6
* - ``extensions``, ``haveDynamicMPATH``, ``remove-property``
* - ``extensions``, ``remove-property``
- :mfcmd:`getvariant`, :mfcmd:`is-saved`, :mfcmd:`is-used`,
:mfcmd:`lsb-release`, :mfcmd:`module-help`, :mfcmd:`module-tag`,
:mfcmd:`module-virtual`, :mfcmd:`module-warn`,