Dear Frank,
When defining the default version, you may use the module-info
usergroups commands to only define this symbol for some users part of
a group:
if {{compatgroup} in [module-info usergroups]} {
module-version foo/1.2 default
}
The other way I see, is as you suggest to have specific modulepaths
for compat usages.
Cheers,
Xavier
On Tue, 2022-04-12 at 16:32 +0200, Frank Thommen wrote:
> Dear all,
>
> an other question: Is it possible to disable the default versions
> (.version files) per user(!) with some configuration? I haven't
> found
> any so far.
>
> Background: We have a big software stack, which initially (yesrs
> ago)
> used to set default versions for the software packages. In the
> meantime
> we don't do this any more (using "no version" as default version in
> the
> .version files) and we would like to also disable the default for
> all
> older packages. Unfortunately this might have an impact (= break
> them)
> on many workflows on the cluster, as the modules are used in
> probably
> hundreds of scripts. Therefore we would like to offer the users
> the
> possibility to test their scripts and workflows in a situation,
> where
> default package versions are not available. Easiest would be, if
> they
> could switch on/off the usage of the .version files.
>
> Setting the name of the version files could be an option, but this
> name
> seems to be hardcoded in modulecmd.tcl.
>
> The only alternative that comes to my mind would be, that we
> completely
> duplicate the modulefiles and offer one legacy set (with defaults)
> and
> an other set w/o default.
>
> Maybe you have other/better ideas, how we could achieve such a
> testing
> environment?
>
> Cheers, Frank
|