TACC / Lmod

Lmod: An Environment Module System based on Lua, Reads TCL Modules, Supports a Software Hierarchy
http://lmod.readthedocs.org
Other
490 stars 128 forks source link

MANPATH changed after mixing prepend_path and append_path #710

Closed stierhofj closed 2 months ago

stierhofj commented 3 months ago

Lmod version 8.7.43

This is related to https://github.com/TACC/Lmod/issues/590 and the other MANPATH issues.

Loading a modulefile with append_path or prepend_path adding to MANPATH where the empty entry (for system manual entries) is in the middle drops the empty entry. As a result, system entries are no longer accessible.

To Reproduce Set the manpath to somethink like export MANPATH="/opt/sw1/man::/opt/sw2/man" This can be the result when two modules are loaded, one using prepend_path, the other append_path. Load any (additional) module that appends/prepends to MANPATH

Resulting MANPATH is /opt/sw1/man:/opt/sw2/man:/opt/sw3/man (append_path used here for example)

Expected behavior Have the empty entry preserved in MANPATH /opt/sw1/man:/opt/sw2/man::/opt/sw3/man

Desktop (please complete the following information):

rtmclay commented 3 months ago

Thanks very much for the bug report! I was able to reproduce this issue and repair it for me. If you get the chance, please use the Lmod testing branch to see if it fixes it for you. Thanks again!

stierhofj commented 3 months ago

That was fast! It does now work as expected. Thanks for the quick fix!

rtmclay commented 2 months ago

This fix is now part of Lmod 8.7.44. Closing this issue