also consider $LMOD_CMD in bootstrap script#1736
Conversation
|
@verdurin: please test? |
|
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2962/console for more details). This pull request is now ready for review/testing. Please try and find someone who can tackle this; contact @boegel if you're not sure what to do. |
|
@boegel: the bootstrapping works: and I'm able to load EB. However, when I run it there's an error: |
|
@verdurin Thanks for the confirmation. The runtime problem you run into is because the default setting for the modules tool is to use I'm not sure if we want to change the default to something more dynamic... For the bootstrap, it's fine, since it doesn't affect the end result: the installation and generated module file are exactly the same, regardless of the module tool being used. However, if both |
|
@wpoely86 please review? |
| if modtool is None: | ||
| elif modcmd == 'lmod': | ||
| # check value of $LMOD_CMD as fallback | ||
| modcmd = os.environ.get('LMOD_CMD') |
There was a problem hiding this comment.
I think $LMOD_CMD should get preference for $PATH. The Lmod source script only sets $LMOD_CMD not path.
There was a problem hiding this comment.
That's not how the framework does it (when Lmod is used as value for --modules-tool)...
It's mostly for backwards compatibility: what if you have both lmod in your $PATH, and $LMOD_CMD defined to something else? Weird setup, sure...
There was a problem hiding this comment.
well, then $LMOD_CMD wins. It's the way Lmod works. The whole $PATH thing should be a fallback. Unless you do it very explicitly yourself, lmod will not be in the $PATH.
There was a problem hiding this comment.
Indeed, and since that's how people have been doing it for a while (making sure lmod is available), we need to take backwards compatibility into account...
In practice, it really shouldn't matter: if you don't have lmod in $PATH, it'll pick up $LMOD_CMD. So fine, right?
There was a problem hiding this comment.
Well, I would pick first what Lmod will pick: $LMOD_CMD. Whatever you do with your $PATH doesn't really matter.
There was a problem hiding this comment.
Well, ok, but that should be considered in a separate PR.
And this that's a change that breaks backward compatibility, I'd like to talk this over with a couple of the 'regulars' before it gets merged.
So, let's merge this PR, and change it to let $LMOD_CMD win consistently in both the bootstrap script and framework itself in a stand-alone PR.
No description provided.