diff options
author | Xavier Delaruelle <xavier.delaruelle@cea.fr> | 2023-10-26 13:49:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-26 11:49:13 +0000 |
commit | 86520abb68e64769d8feb87e4e4b151d5a2263ea (patch) | |
tree | 20fe13f69ab7100802ae7e622447567636160162 /bin/spack-tmpconfig | |
parent | bf88ed45da1554bd55436780846623ba1afeb3a6 (diff) | |
download | spack-86520abb68e64769d8feb87e4e4b151d5a2263ea.tar.gz spack-86520abb68e64769d8feb87e4e4b151d5a2263ea.tar.bz2 spack-86520abb68e64769d8feb87e4e4b151d5a2263ea.tar.xz spack-86520abb68e64769d8feb87e4e4b151d5a2263ea.zip |
modules: hide implicit modulefiles (#36619)
Renames exclude_implicits to hide_implicits
When hide_implicits option is enabled, generate modulefile of
implicitly installed software and hide them. Even if implicit, those
modulefiles may be referred as dependency in other modulefiles thus they
should be generated to make module properly load dependent module.
A new hidden property is added to BaseConfiguration class.
To hide modulefiles, modulercs are generated along modulefiles. Such rc
files contain specific module command to indicate a module should be
hidden (for instance when using "module avail").
A modulerc property is added to TclFileLayout and LmodFileLayout classes
to get fully qualified path name of the modulerc associated to a given
modulefile.
Modulerc files will be located in each module directory, next to the
version modulefiles. This scheme is supported by both module tool
implementations.
modulerc_header and hide_cmd_format attributes are added to
TclModulefileWriter and LmodModulefileWriter. They help to know how to
generate a modulerc file with hidden commands for each module tool.
Tcl modulerc file requires an header. As we use a command introduced on
Modules 4.7 (module-hide --hidden-loaded), a version requirement is
added to header string.
For lmod, modules that open up a hierarchy are never hidden, even if
they are implicitly installed.
Modulerc is created, updated or removed when associated modulefile is
written or removed. If an implicit modulefile becomes explicit, hidden
command in modulerc for this modulefile is removed. If modulerc becomes
empty, this file is removed. Modulerc file is not rewritten when no
content change is detected.
Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
Diffstat (limited to 'bin/spack-tmpconfig')
0 files changed, 0 insertions, 0 deletions