Skip to content
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

Merged
merged 8 commits into from
Aug 24, 2017
Merged

Conversation

boegel
Copy link
Member

@boegel boegel commented Aug 24, 2017

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

@boegel boegel added this to the 3.4.0 milestone Aug 24, 2017
@boegel boegel requested a review from a team August 24, 2017 08:56
Example
~~~~~~~

Suppose existing modules in both Tcl & Lua syntax are present for bzip2 1.0.6.
Copy link
Member

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

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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?)

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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

@ocaisa ocaisa merged commit 8824d98 into easybuilders:develop Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants