mirror of
https://github.com/envmodules/modules.git
synced 2026-06-18 00:06:53 +08:00
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.