add support for ModuleLoadEnvironment aliases in modextrapaths easyconfig parameter + deprecate allow_append_abs_path, allow_prepend_abs_path, modextrapaths_append easyconfig parameters#4774
Merged
Conversation
…paths in make_module_req leveraging ModuleLoadEnvironment
…uments to ModuleEnvironmentVariable
…ents have been aligned with modextrapaths options
…oadEnvironment and expand globs to real paths following symlinks
…ng out of install dir
…g with underscores
…paths in modextrapaths are always allowed
… attribute to mod_prepend
Contributor
Author
|
Test report for underscore variables of |
Contributor
Author
|
Test report for
|
ModuleLoadEnvironment aliases in easyconfig parameter modextrapaths
ModuleLoadEnvironment aliases in easyconfig parameter modextrapathsModuleLoadEnvironment aliases in modextrapaths easyconfig parameter + deprecate allow_append_abs_path, allow_prepend_abs_path, modextrapaths_append easyconfig parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for
--module-search-path-headerstomodextrapathsThis is the final change to fully fix #3331 . Now that we have
--module-search-path-headerswe need to allowmodextrapathsto follow that setting. This PR achieves that by addingMODULE_LOAD_ENV_HEADERSas a new constant in easyconfigs. Hence, the sameMODULE_LOAD_ENV_HEADERSglobal can be used in EasyBlocks and EasyConfigs.Unify interface to add extra paths in easyconfigs
Currently, there are differing methods to handle options for extra paths. For instance:
modextrapathsandmodextrapaths_appendallow to change placement of paths in the module environmentmodextrapath = { 'ENV_VAR' : {'paths': "path", 'delimiter': ':'}}allow_append_abs_pathandallow_prepend_abs_pathenable absolute paths inmodextrapathsThis PR standardizes how extra paths can be injected in easyconfigs by making
modextrapathsthe only usable parameter. All existing options have been added toModuleEnvironmentVariable(likedelimiterandprepend) and all class settings can now be set through a dictionary inmodextrapaths. Example:Hence,
modextrapathsbecomes the interface toModuleLoadEnvironmentat the easyconfig level.modextrapaths_appendis deprecated, same result can be achieved with{'prepend': False}inmodextrapaths.Enable absolute paths in module environment
Absolute paths are allowed by default in all path variables of
ModuleLoadEnvironment. Deprecatingallow_append_abs_pathandallow_prepend_abs_path.Providing a glob pattern that is an absolute path is enough to enable absolute paths expansion and injection in module files.
Method
expand_module_search_pathis enhanced to handle absolute globs:expand_module_search_pathalways returns paths avoiding symlinks. This removes the need to check for the topology of symlinks betweenlibandlib64for instance. However, generated modules look different in some cases, with paths to the same folder jumping through different parents (e.g.imklwith libraries in customs dirs andlibandlib64symlinks).LibSymlinkclass and related methods from frameworkEnhance
ModuleLoadEnvironmentto handle environment variables starting with underscoresModuleLoadEnvironmentenhanced to allow handling environment variables that start with one or more underscores. This is necessary to process easyconfigs like libglvnd-1.7.0-GCCcore-13.3.0.eb.All public environment variables are now stored inside a custom dict in
ModuleLoadEnvironment._env_vars. Getter and setter methods have been modified to be able to discriminate between private attributes of the class and public environment variables.