@@ -341,7 +341,8 @@ switches are accepted:
341341 On :subcmd: `clear ` sub-command, skip the confirmation dialog and proceed.
342342
343343 On :subcmd: `purge ` sub-command also unload `sticky modules `_ and modulefiles
344- that are depended by non-unloadable modules.
344+ that are depended by non-unloadable modules, except requirements of retained
345+ super-sticky modules.
345346
346347 .. only :: html or latex
347348
@@ -1772,6 +1773,9 @@ Module Sub-Commands
17721773 Error behavior when unloading sticky or super-sticky module during a module
17731774 :subcmd: `purge `.
17741775
1776+ Also applies to modules whose unload is skipped because they are required,
1777+ directly or indirectly, by a retained sticky or super-sticky module.
1778+
17751779 Raise an ``error `` (default) or emit a ``warning `` or be ``silent ``. It can
17761780 be changed at installation time with :instopt: `--with-sticky-purge ` option.
17771781 The :envvar: `MODULES_STICKY_PURGE ` environment variable is defined by
@@ -2379,9 +2383,15 @@ Module Sub-Commands
23792383
23802384 Unload all loaded *modulefiles *.
23812385
2386+ Sticky and super-sticky modules are kept loaded, along with their required
2387+ modules, including indirect requirements. Unload attempts for these modules
2388+ are skipped according to the :mconfig: `sticky_purge ` configuration: raise an
2389+ ``error `` (default), emit a ``warning `` or remain ``silent ``.
2390+
23822391 When the :option: `--force ` option is set, also unload `sticky modules `_,
23832392 modulefiles that are depended by non-unloadable modules and modulefiles
2384- raising an evaluation error.
2393+ raising an evaluation error. Super-sticky modules and their requirements
2394+ remain loaded even with :option: `--force `.
23852395
23862396 If one modulefile unload evaluation raises an error, purge sequence
23872397 continues: unloaded modules prior the evaluation error are kept unloaded and
@@ -2398,6 +2408,9 @@ Module Sub-Commands
23982408 .. versionchanged :: 5.4
23992409 Support for :mconfig: `abort_on_error ` configuration option added
24002410
2411+ .. versionchanged :: 5.7
2412+ Preserve requirements of retained sticky and super-sticky modules
2413+
24012414.. subcmd :: refresh
24022415
24032416 Force a refresh of all non-persistent components of currently loaded modules.
@@ -3542,6 +3555,14 @@ Modules are designated sticky by associating them the ``sticky`` or the
35423555``super-sticky `` :ref: `module tag<Module tags> ` with the :mfcmd: `module-tag `
35433556modulefile command.
35443557
3558+ Starting with version 5.7, :subcmd: `purge ` also preserves the direct and
3559+ indirect requirements of retained sticky or super-sticky modules, even if
3560+ these requirements have no sticky tag. The :mconfig: `sticky_purge `
3561+ configuration applies to their skipped unload. With :option: `--force `,
3562+ sticky modules can be unloaded, but super-sticky modules and their
3563+ requirements remain loaded. If several loaded modules satisfy an alternative
3564+ requirement, only the last necessary one is preserved.
3565+
35453566When stickiness is defined over the generic module name (and not over a
35463567specific module version, a version list or a version range), sticky or
35473568super-sticky module can be swapped by another version of module. For instance
@@ -6128,6 +6149,9 @@ ENVIRONMENT
61286149 :subcmd: `purge `, raise an ``error `` or emit a ``warning `` message or be
61296150 ``silent ``.
61306151
6152+ Also applies to the skipped unload of modules required, directly or
6153+ indirectly, by a retained sticky or super-sticky module.
6154+
61316155 This environment variable value supersedes the default value set in the
61326156 :mconfig: `sticky_purge ` configuration option. It can be defined with the
61336157 :subcmd: `config ` sub-command.
@@ -6433,4 +6457,3 @@ SEE ALSO
64336457--------
64346458
64356459:ref: `envml(1) `, :ref: `ml(1) `, :ref: `modulecmd(1) `, :ref: `modulefile(5) `
6436-
0 commit comments