-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document --backup-modules #367
Conversation
docs/Backup_modules.rst
Outdated
Example | ||
~~~~~~~ | ||
|
||
Suppose existing modules in both Tcl & Lua syntax are present for bzip2 1.0.6. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to be similar to what is below:
``bzip2/1.0.6``
-rw-r--r-- 1 example example 1256 Jul 11 01:24 1.0.6 | ||
-rw-r--r-- 1 example example 1303 Jul 11 01:26 1.0.6.lua | ||
-rw-r--r-- 1 example example 1259 Aug 24 10:26 1.0.6.lua.bak_20170824102603 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious what happens in the case that you have an initial module in tcl syntax and then generate the replacement in lua syntax (or vice versa). Can the option handle that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have a module in Tcl syntax, and then generate a module in Lua, the Tcl one is untouched, and hence not backed up.
Backing up is only relevant when you're actually overwriting an existing file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, but isn't that exactly a use case here...I have tcl modules and then I move to Lmod, I want to update to Lua syntax...but if I leave the tcl module untouched it will automatically be picked up by Lmod, so I have 2 available modules providing the same software package (or does Lmod always choose lua files first?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I should have asked that in the original PR though, this PR is good to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lmod always prefers Lua modules over Tcl modules; if you have both, the Tcl module is ignored.
With Tmod, .lua
modules are not picked up because the #%Module
header isn't there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that works for me
Support for
--backup-modules
was merged to be included in EasyBuild v3.4.0 in easybuilders/easybuild-framework#2134.This leverages #365; since @damianam is on leave I looked into extending it a bit.
Preview at http://boegel-eb.readthedocs.io/en/backup_modules/Backup_modules.html