Description of problem: Lmod packages prevent the correct function of `module use`, upon further bash invocations due to this being hardwired in the .spec: ``` echo 'export MODULEPATH=%{_sysconfdir}/modulefiles:%{_datadir}/modulefiles:%{_datadir}/Modules/modulefiles' > %{buildroot}%{_sysconfdir}/profile.d/00-modulepath.sh echo 'setenv MODULEPATH %{_sysconfdir}/modulefiles:%{_datadir}/modulefiles:%{_datadir}/Modules/modulefiles' > %{buildroot}%{_sysconfdir}/profile.d/00-modulepath.csh ``` Version-Release number of selected component (if applicable): 6.x.y (all) How reproducible: always. Steps to Reproduce: just try: $ echo $MODULEPATH $ module use $HOME/privatemodules $ bash $ echo $MODULEPATH ## it gets reset in a very unwanted way, because of `bash` Actual results: Two same $MODULEPATH outputs Expected results: $MODULEPATH gets reset Additional info:
fyi. the solution to this could be to use a guard variable, similar to what is described here: http://lmod.readthedocs.org/en/latest/045_transition.html#an-example-of-how-this-can-be-done-in-your-bash-startup-scripts ie. once somebody has defined MODULEPATH already, do not touch it anymore.
Created attachment 1150532 [details] Set Fedora defaults from Lmod's init scripts The attached patch sets Fedora default values for MODULEPATH from within Lmod's init/profile and init/cshrc startup files, linked from /etc/profile.d/z00_lmod.sh and /etc/profile.d/z00_lmod.csh respectively. Lmod is designed to set those values only during the user's first login shell (using MODULEPATH_ROOT as a flag) to keep MODULEPATH's current value through subshells. /etc/00-modulepath.sh and /etc/00-modulepath.csh should be eliminated because they reset MODULEPATH.
We need 00-modulepath to sync the initial MODULEPATH between environment-modules and Lmod, but you are correct that it shouldn't reset it. I think I've go a fix.
Lmod-6.3.1-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-81e9d1896a
Lmod-6.3.1-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-81e9d1896a
Lmod-6.3.1-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-81e9d1896a
Lmod-6.3.1-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-81e9d1896a
Lmod-6.3.1-3.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-81e9d1896a
Lmod-6.3.1-3.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-81e9d1896a
Lmod-6.3.4-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-60ef85e569
Lmod-6.3.4-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-60ef85e569
Lmod-6.3.4-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.