https://bugzilla.suse.com/show_bug.cgi?id=1159563 https://bugzilla.suse.com/show_bug.cgi?id=1159563#c2 Matej Cepl <mcepl@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mcepl@suse.com --- Comment #2 from Matej Cepl <mcepl@suse.com> --- Does anybody understand tcsh? Is this the solution? Index: lua-lmod.spec =================================================================== --- lua-lmod.spec (revision be6ab1c59efba481b6b1bf7e9a8695bb) +++ lua-lmod.spec (working copy) @@ -195,9 +195,9 @@ export LMOD_PREPEND_BLOCK=normal if [ \$EUID -eq 0 ]; then - export MODULEPATH=%{?OHPC_MODULES:%{OHPC_ADMIN}/modulefiles:%{OHPC_MODULES}:}%{lua_lmod_admin_modulesdir}:%{lua_lmod_modulesdir} + export MODULEPATH=\${MODULEPATH:+\${MODULEPATH}:}%{?OHPC_MODULES:%{OHPC_ADMIN}/modulefiles:%{OHPC_MODULES}:}%{lua_lmod_admin_modulesdir}:%{lua_lmod_modulesdir} else - export MODULEPATH=%{?OHPC_MODULES:%{OHPC_MODULES}:}%{lua_lmod_modulesdir} + export MODULEPATH=\${MODULEPATH:+\${MODULEPATH}:}%{?OHPC_MODULES:%{OHPC_MODULES}:}%{lua_lmod_modulesdir} fi export BASH_ENV=%{_datadir}/lmod/%{version}/init/bash @@ -227,10 +227,16 @@ setenv LMOD_COLORIZE "no" setenv LMOD_PREPEND_BLOCK "normal" +if \${?MODULEPATH} then + setenv MODULEPATH "\${MODULEPATH}:" +else + setenv MODULEPATH "" +endif + if ( \`id -u\` == "0" ) then - setenv MODULEPATH "%{?OHPC_MODULES:%{OHPC_ADMIN}/modulefiles:%{OHPC_MODULES}:}%{lua_lmod_admin_modulesdir}:%{lua_lmod_modulesdir}" + setenv MODULEPATH "\${MODULEPATH}%{?OHPC_MODULES:%{OHPC_ADMIN}/modulefiles:%{OHPC_MODULES}:}%{lua_lmod_admin_modulesdir}:%{lua_lmod_modulesdir}" else - setenv MODULEPATH "%{?OHPC_MODULES:%{OHPC_MODULES}:}%{lua_lmod_modulesdir}" + setenv MODULEPATH "\${MODULEPATH}%{?OHPC_MODULES:%{OHPC_MODULES}:}%{lua_lmod_modulesdir}" endif # Initialize modules system -- You are receiving this mail because: You are on the CC list for the bug.