Hello Paul,
Thanks for your explanation.
I have used your ".obsolete" trick and it works fine.
Best regards,
Laurent.
-----Message d'origine-----
De : Paul Markfort <pau...@gm...>
Envoyé : samedi 23 août 2025 16:55
À : mod...@li...
Objet : Re: [Modules] module avail is not saying the truth!
I should add:
"module avail" will list the "a/b" module in both locations, but all commands will operate on the first one.
And, I believe, the same is true of the .modulerc file (only the first one found will be used, and it will apply to both module folders "a/" (even if the only .modulerc is in the second folder - it will apply to both). Xavier can correct me, if I have that wrong.
Hopefully, this clarifies the situation.
I think if you want to deny access to the first module, you might try making it unreadable (chmod a-r ). I am not sure if that will work - but it is worth a try (otherwise, just rename or remove it).
As a side note, To get rid of an old module, but save it for posterity - I create an .obsolete folder in the module folder and move it there (you can find it, and put it back if you need to). This hides it from module avail.
Also, if you want to include pictures - that is fine.
But please also include the complete text output in the message as well.
Thanks.
On 2025-08-22 10:15 AM, Paul Markfort wrote:
> Not a bug.
> This behavior goes way back to the Turn of the Century.
>
> If you have:
> MODULEPATH=/home/user/modules:/usr/etc/modules/common
>
> And you have the files:
> /home/user/modules/a/b
> /usr/etc/modules/common/a/b
>
>
> Only the first module "a/b" will be visible to the modules command.
>
> I use this "FEATURE" all the time to test changes to existing modules.
> (copy the module from the second path, to the first - then change an modify the copy and test it).
>
>
>
>
> On 2025-08-22 5:17 AM, Laurent BESSON wrote:
>> Hello dear Modules users,
>>
>> As an introduction, I have to say I did something weird : I have the same module name in 2 places and both are visible to < module > command.
>>
>> Of course, these 2 modules files have a different content. And I wanted to < forbid > one. So I added in a .modulerc the following line :
>>
>> module-forbid --message "This version has been removed"
>> /media/TmpStore/users/lbesson/Tools/modulefiles/mentor/questa_lint/20
>> 25.2_1
>>
>> When I run < ml avail mentor/questa_lint>, it says (I include a screenshot to keep colors and nice display) :
>>
>> [cid:image001.png@01DC135D.46C53D90]
>>
>> It shows exactly the expected behaviour. But then I try to load the < available > one and I get this :
>>
>> [cid:image002.png@01DC135E.B4DE18A0]
>>
>> To me, it looks like a bug : I should be allowed to load <
>> mentor/questa_lint/2025.2_1 > from < /tool/modules >
>>
>> What do you think ?
>>
>> Best regards,
>> Laurent.
>>
>> PS : I'm running Modules 5.5 under RedHat machines
>>
>>
>>
>> _______________________________________________
>> Modules-interest mailing list
>> Mod...@li...
>> https://lists.sourceforge.net/lists/listinfo/modules-interest
>>
>
--
--------------------------------------------------------
The views and opinions expressed above are strictly those of the author(s). The content of this message has not been reviewed nor approved by any entity whatsoever.
--------------------------------------------------------
Paul FM Info: http://paulfm.com/~paulfm/
--------------------------------------------------------
_______________________________________________
Modules-interest mailing list
Mod...@li...
https://lists.sourceforge.net/lists/listinfo/modules-interest
|