"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "testsuite/modules.70-maint/120-autoinit.exp" between
modules-5.1.1.tar.bz2 and modules-5.2.0.tar.bz2

About: The Environment Modules package provides for the dynamic modification of a user’s environment via modulefiles.

120-autoinit.exp  (modules-5.1.1.tar.bz2):120-autoinit.exp  (modules-5.2.0.tar.bz2)
skipping to change at line 94 skipping to change at line 94
set initrc_exinstalled 0 set initrc_exinstalled 0
if {[info exists insmodrcdata] && [info exists exmodrcdata] && $exmodrcdata eq $ insmodrcdata} { if {[info exists insmodrcdata] && [info exists exmodrcdata] && $exmodrcdata eq $ insmodrcdata} {
set modrc_exinstalled 1 set modrc_exinstalled 1
} elseif {[info exists insmodrcdata] && [info exists exmodrc1data] && $exmodrc1d ata eq $insmodrcdata} { } elseif {[info exists insmodrcdata] && [info exists exmodrc1data] && $exmodrc1d ata eq $insmodrcdata} {
set modrc1_exinstalled 1 set modrc1_exinstalled 1
} elseif {[info exists insmodrcdata] && [info exists exinitrcdata] && $exinitrcd ata eq $insmodrcdata} { } elseif {[info exists insmodrcdata] && [info exists exinitrcdata] && $exinitrcd ata eq $insmodrcdata} {
set initrc_exinstalled 1 set initrc_exinstalled 1
} }
set custom {module restore unk} set custom {module restore unk}
set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modrc 36 { }]] set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modrc 54 { }]]
set tserr_modrc_exinstalled [msg_load null]
set tserr_initrc_exinstalled "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m 2 {} m1 {}]\n\nunload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[m sg_unload mj]\nload m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}]\n$err_path'unk'\n$custom" set tserr_initrc_exinstalled "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m 2 {} m1 {}]\n\nunload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[m sg_unload mj]\nload m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}]\n$err_path'unk'\n$custom"
set tserr_initrc1_exinstalled [msg_load null] set tserr_initrc1_exinstalled [msg_load null]
set lminit_modrc_exinstalled "module use --append $install_modulepath:module loa
d null"
set lminit_modrc1_exinstalled "module use --append $install_modulepath:module lo
ad null"
set lminit_modspath_modrc1_exinstalled "module use --append $install_modulepath:
module use --append $install_prefix/test/modulefiles:module use --append $instal
l_prefix/test/etc:module load null"
set lminit_initrc_exinstalled "module use --append {$modpath wspace}:module use
--append $modpath.deps:module load --tag=auto-loaded m1:module load m3:module lo
ad {space yc/4}"
set lminit_modspath_exinstalled "module use --append $install_modulepath:module
use --append $install_prefix/test/modulefiles:module use --append $install_prefi
x/test/etc"
# check if stderr terminal attachment state is forced # check if stderr terminal attachment state is forced
set is_stderr_tty [siteconfig_isStderrTty] set is_stderr_tty [siteconfig_isStderrTty]
if { $verbose > 0 } { if { $verbose > 0 } {
send_user "\tIs STDERR a TTY? = '$is_stderr_tty'\n" send_user "\tIs STDERR a TTY? = '$is_stderr_tty'\n"
} }
set err_lisp "$error_msgs: lisp mode autoinit not yet implemented" set err_lisp "$error_msgs: lisp mode autoinit not yet implemented"
set err_cmd "$error_msgs: No autoinit mode available for 'cmd' shell" set err_cmd "$error_msgs: No autoinit mode available for 'cmd' shell"
set end_quar_sh "\\s*if \\\[ \"\\\${_mlv}\" = \"\\\${_mlv##\\\*\\\[\\\!A-Za-z0-9 set end_quar_sh "\\s*if \\\[ \"\\\${_mlv}\" = \"\\\${_mlv##\\\*\\\[\\\!A-Za-z0-9
_\\\]}\" -a \"\\\${_mlv}\" = \"\\\${_mlv#\\\[0-9\\\]}\" \\\]; then _\\\]}\" \\\] && \\\[ \"\\\${_mlv}\" = \"\\\${_mlv#\\\[0-9\\\]}\" \\\]; then
\\s*if \\\[ -n \"\\\$\\\(eval 'echo \\\${'\\\$_mlv'\\\+x}'\\\)\" \\\]; then \\s*if \\\[ -n \"\\\$\\\(eval 'echo \\\${'\"\\\$_mlv\"'\\\+x}'\\\)\" \\\]; then
\\s*_mlre=\"\\\${_mlre:-}__MODULES_QUAR_\\\${_mlv}='\\\$\\\(eval 'echo \\\${'\\\ \\s*_mlre=\"\\\${_mlre:-}__MODULES_QUAR_\\\${_mlv}='\\\$\\\(eval 'echo \\\${'\"\
$_mlv'}'\\\)' \"; \\$_mlv\"'}'\\\)' \";
\\s*fi; \\s*fi;
\\s*_mlrv=\"MODULES_RUNENV_\\\${_mlv}\"; \\s*_mlrv=\"MODULES_RUNENV_\\\${_mlv}\";
\\s*_mlre=\"\\\${_mlre:-}\\\${_mlv}='\\\$\\\(eval 'echo \\\${'\\\$_mlrv':-}'\\\) ' \"; \\s*_mlre=\"\\\${_mlre:-}\\\${_mlv}='\\\$\\\(eval 'echo \\\${'\"\\\$_mlrv\"':-}' \\\)' \";
\\s*fi; \\s*fi;
\\s*done;" \\s*done;"
set func_quar_sh_quar "\\s*unset _mlre _mlIFS; set func_quar_sh_quar "\\s*unset _mlre _mlIFS;
\\s*if \\\[ -n \"\\\${IFS\\\+x}\" \\\]; then \\s*if \\\[ -n \"\\\${IFS\\\+x}\" \\\]; then
\\s*_mlIFS=\\\$IFS; \\s*_mlIFS=\\\$IFS;
\\s*fi; \\s*fi;
\\s*IFS=' '; \\s*IFS=' ';
\\s*for _mlv in \\\${MODULES_RUN_QUARANTINE:-}; do \\s*for _mlv in \\\${MODULES_RUN_QUARANTINE:-}; do
$end_quar_sh\n" $end_quar_sh\n"
if {$install_quarantinesupport eq y} { if {$install_quarantinesupport eq y} {
skipping to change at line 147 skipping to change at line 154
set func_silentdbg_silentdbg "\\s*unset _mlshdbg; set func_silentdbg_silentdbg "\\s*unset _mlshdbg;
\\s*if \\\[ \"\\\${MODULES_SILENT_SHELL_DEBUG:-0}\" = '1' \\\]; then \\s*if \\\[ \"\\\${MODULES_SILENT_SHELL_DEBUG:-0}\" = '1' \\\]; then
\\s*case \"\\\$-\" in \\s*case \"\\\$-\" in
\\s*\\\*v\\\*x\\\*\\\) set \\\+vx; _mlshdbg='vx' ;; \\s*\\\*v\\\*x\\\*\\\) set \\\+vx; _mlshdbg='vx' ;;
\\s*\\\*v\\\*\\\) set \\\+v; _mlshdbg='v' ;; \\s*\\\*v\\\*\\\) set \\\+v; _mlshdbg='v' ;;
\\s*\\\*x\\\*\\\) set \\\+x; _mlshdbg='x' ;; \\s*\\\*x\\\*\\\) set \\\+x; _mlshdbg='x' ;;
\\s*\\\*\\\) _mlshdbg='' ;; \\s*\\\*\\\) _mlshdbg='' ;;
\\s*esac; \\s*esac;
\\s*fi;\n" \\s*fi;\n"
set end_silentdbg_silentdbg "\\s*if \\\[ -n \"\\\${_mlshdbg:-}\" \\\]; then set end_silentdbg_silentdbg "\\s*if \\\[ -n \"\\\${_mlshdbg:-}\" \\\]; then
\\s*set -\\\$_mlshdbg; \\s*set -\"\\\$_mlshdbg\";
\\s*fi; \\s*fi;
\\s*unset _mlshdbg;\n" \\s*unset _mlshdbg;\n"
if {$install_silentshdbgsupport eq y} { if {$install_silentshdbgsupport eq y} {
set func_silentdbg $func_silentdbg_silentdbg set func_silentdbg $func_silentdbg_silentdbg
set end_silentdbg $end_silentdbg_silentdbg set end_silentdbg $end_silentdbg_silentdbg
} else { } else {
set func_silentdbg "" set func_silentdbg ""
set end_silentdbg "" set end_silentdbg ""
} }
skipping to change at line 175 skipping to change at line 182
set func_clean_ifs $func_clean_ifs_quar set func_clean_ifs $func_clean_ifs_quar
} else { } else {
set func_clean_ifs "" set func_clean_ifs ""
} }
set func_end "\\s*_mlstatus=\\\$\\\?;\n$func_clean_ifs$end_silentdbg\\s*return \ \\$_mlstatus;" set func_end "\\s*_mlstatus=\\\$\\\?;\n$func_clean_ifs$end_silentdbg\\s*return \ \\$_mlstatus;"
set func_end_quar "\\s*_mlstatus=\\\$\\\?;\n$func_clean_ifs_quar$end_silentdbg\\ s*return \\\$_mlstatus;" set func_end_quar "\\s*_mlstatus=\\\$\\\?;\n$func_clean_ifs_quar$end_silentdbg\\ s*return \\\$_mlstatus;"
set func_end_silentdbg "\\s*_mlstatus=\\\$\\\?;\n$end_silentdbg_silentdbg\\s*ret urn \\\$_mlstatus;" set func_end_silentdbg "\\s*_mlstatus=\\\$\\\?;\n$end_silentdbg_silentdbg\\s*ret urn \\\$_mlstatus;"
set func_modcmd_bash_quar "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then set func_modcmd_bash_quar "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then
\\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \"; \\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \";
\\s*eval \"\\\$\\\(eval \\\${_mlre} $tclshlocre $modulecmd_pathre bash '\"\\$\\@ \"'\\\)\"; \\s*eval \"\\\$\\\(eval \\\${_mlre} $tclshlocre '$modulecmd_pathre' bash '\"\\$\ \@\"'\\\)\";
\\s*else \\s*else
\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre bash \"\\$\\@\"\\\)\"; \\s*eval \"\\\$\\\($tclshlocre '$modulecmd_pathre' bash \"\\$\\@\"\\\)\";
\\s*fi;" \\s*fi;"
if {$install_quarantinesupport eq y} { if {$install_quarantinesupport eq y} {
set func_modcmd_sh "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then set func_modcmd_sh "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then
\\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \"; \\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \";
\\s*eval \"\\\$\\\(eval \\\${_mlre} $tclshlocre $modulecmd_pathre sh '\"\\$\\@\" '\\\)\"; \\s*eval \"\\\$\\\(eval \\\${_mlre} $tclshlocre '$modulecmd_pathre' sh '\"\\$\\@ \"'\\\)\";
\\s*else \\s*else
\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre sh \"\\$\\@\"\\\)\"; \\s*eval \"\\\$\\\($tclshlocre '$modulecmd_pathre' sh \"\\$\\@\"\\\)\";
\\s*fi;" \\s*fi;"
set func_modcmd_bash $func_modcmd_bash_quar set func_modcmd_bash $func_modcmd_bash_quar
set func_modcmd_ksh "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then set func_modcmd_ksh "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then
\\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \"; \\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \";
\\s*eval \"\\\$\\\(eval \\\${_mlre} $tclshlocre $modulecmd_pathre ksh '\"\\$\\@\ "'\\\)\"; \\s*eval \"\\\$\\\(eval \\\${_mlre} $tclshlocre '$modulecmd_pathre' ksh '\"\\$\\ @\"'\\\)\";
\\s*else \\s*else
\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre ksh \"\\$\\@\"\\\)\"; \\s*eval \"\\\$\\\($tclshlocre '$modulecmd_pathre' ksh \"\\$\\@\"\\\)\";
\\s*fi;" \\s*fi;"
set func_modcmd_zsh "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then set func_modcmd_zsh "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then
\\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \"; \\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \";
\\s*eval \"\\\$\\\(eval \\\${\\^\\^=_mlre} $tclshlocre $modulecmd_pathre zsh '\" \\$\\@\"'\\\)\"; \\s*eval \"\\\$\\\(eval \\\${\\^\\^=_mlre} $tclshlocre '$modulecmd_pathre' zsh ' \"\\$\\@\"'\\\)\";
\\s*else \\s*else
\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre zsh \"\\$\\@\"\\\)\"; \\s*eval \"\\\$\\\($tclshlocre '$modulecmd_pathre' zsh \"\\$\\@\"\\\)\";
\\s*fi;" \\s*fi;"
} else { } else {
set func_modcmd_sh "\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre sh \"\\$\\@ set func_modcmd_sh "\\s*eval \"\\\$\\\($tclshlocre '$modulecmd_pathre' sh \"\\$\
\"\\\)\";" \@\"\\\)\";"
set func_modcmd_bash "\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre bash \"\\ set func_modcmd_bash "\\s*eval \"\\\$\\\($tclshlocre '$modulecmd_pathre' bash \"
$\\@\"\\\)\";" \\$\\@\"\\\)\";"
set func_modcmd_ksh "\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre ksh \"\\$\ set func_modcmd_ksh "\\s*eval \"\\\$\\\($tclshlocre '$modulecmd_pathre' ksh \"\\
\@\"\\\)\";" $\\@\"\\\)\";"
set func_modcmd_zsh "\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre zsh \"\\$\ set func_modcmd_zsh "\\s*eval \"\\\$\\\($tclshlocre '$modulecmd_pathre' zsh \"\\
\@\"\\\)\";" $\\@\"\\\)\";"
} }
set func_name "_module_raw" set func_name "_module_raw"
set add_func_sh "\nmodule\\\(\\\) { set add_func_sh "\nmodule\\\(\\\) {
\\s*local _mlredir=$is_stderr_tty; \\s*local _mlredir=$is_stderr_tty;
\\s*if \\\[ -n \"\\\${MODULES_REDIRECT_OUTPUT\\\+x}\" \\\]; then \\s*if \\\[ -n \"\\\${MODULES_REDIRECT_OUTPUT\\\+x}\" \\\]; then
\\s*if \\\[ \"\\\$MODULES_REDIRECT_OUTPUT\" = '0' \\\]; then \\s*if \\\[ \"\\\$MODULES_REDIRECT_OUTPUT\" = '0' \\\]; then
\\s*_mlredir=0; \\s*_mlredir=0;
\\s*elif \\\[ \"\\\$MODULES_REDIRECT_OUTPUT\" = '1' \\\]; then \\s*elif \\\[ \"\\\$MODULES_REDIRECT_OUTPUT\" = '1' \\\]; then
\\s*_mlredir=1; \\s*_mlredir=1;
skipping to change at line 263 skipping to change at line 270
\\s*set _mlredir 1 \\s*set _mlredir 1
\\s*end \\s*end
\\s*end \\s*end
\\s*if contains -- --no-redirect \\\$argv; or begin ; \\\[ \\\$_mlredir -eq 0 \\ \]; and not contains -- --redirect \\\$argv ; end \\s*if contains -- --no-redirect \\\$argv; or begin ; \\\[ \\\$_mlredir -eq 0 \\ \]; and not contains -- --redirect \\\$argv ; end
\\s*_module_raw \\\$argv \\s*_module_raw \\\$argv
\\s*else \\s*else
\\s*_module_raw \\\$argv 2>&1 \\s*_module_raw \\\$argv 2>&1
\\s*end \\s*end
end" end"
set func_bash_quar "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh_quar$func set export_func_bash "export -f _module_raw;\nexport -f module;"
_modcmd_bash_quar\n$func_end_quar\n};$add_func_sh"
set func_bash_silentdbg "$func_name\\\(\\\) {\n$func_silentdbg_silentdbg$func_qu set func_bash_quar "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh_quar$func
ar_sh$func_modcmd_bash\n$func_end_silentdbg\n};$add_func_sh" _modcmd_bash_quar\n$func_end_quar\n};$add_func_sh\n$export_func_bash"
set func_bash_silentdbg "$func_name\\\(\\\) {\n$func_silentdbg_silentdbg$func_qu
ar_sh$func_modcmd_bash\n$func_end_silentdbg\n};$add_func_sh\n$export_func_bash"
set func_sh "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh$func_modcmd_sh\n $func_end\n};$add_func_sh" set func_sh "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh$func_modcmd_sh\n $func_end\n};$add_func_sh"
set func_bash "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh$func_modcmd_ba sh\n$func_end\n};$add_func_sh" set func_bash "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh$func_modcmd_ba sh\n$func_end\n};$add_func_sh\n$export_func_bash"
set func_ksh "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh$func_modcmd_ksh \n$func_end\n};$add_func_ksh" set func_ksh "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh$func_modcmd_ksh \n$func_end\n};$add_func_ksh"
set func_zsh "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_zsh$func_modcmd_zs h\n$func_end\n};$add_func_sh" set func_zsh "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_zsh$func_modcmd_zs h\n$func_end\n};$add_func_sh"
set eval_cmd_csh [expr {$install_wa277 eq {y} ? "eval `$tclshlocre $modulecmd_pa set eval_cmd_csh [expr {$install_wa277 eq {y} ? "eval `$tclshlocre '\"'\"'$modul
thre csh \\\\!\\*`" : "eval \"`$tclshlocre $modulecmd_pathre csh \\\\!\\*:q`\""} ecmd_pathre'\"'\"' csh \\\\!\\*`" : "eval \"`$tclshlocre '\"'\"'$modulecmd_pathr
] e'\"'\"' csh \\\\!\\*:q`\""}]
set eval_cmd_tcsh [expr {$install_wa277 eq {y} ? "eval `$tclshlocre $modulecmd_p set eval_cmd_tcsh [expr {$install_wa277 eq {y} ? "eval `$tclshlocre '\"'\"'$modu
athre tcsh \\\\!\\*`" : "eval \"`$tclshlocre $modulecmd_pathre tcsh \\\\!\\*:q`\ lecmd_pathre'\"'\"' tcsh \\\\!\\*`" : "eval \"`$tclshlocre '\"'\"'$modulecmd_pat
""}] hre'\"'\"' tcsh \\\\!\\*:q`\""}]
set func_csh "if \\\( \\\$\\\?histchars && \\\$\\\?prompt \\\) alias module 'set _histchars = \\\$histchars; unset histchars; set _prompt=\\\$prompt:q; set prom pt=\"\"; $eval_cmd_csh; set _exit=\"\\\$status\"; set histchars = \\\$_histchars ; unset _histchars; set prompt=\\\$_prompt:q; unset _prompt; test 0 = \\\$_exit' ; set func_csh "if \\\( \\\$\\\?histchars && \\\$\\\?prompt \\\) alias module 'set _histchars = \\\$histchars; unset histchars; set _prompt=\\\$prompt:q; set prom pt=\"\"; $eval_cmd_csh; set _exit=\"\\\$status\"; set histchars = \\\$_histchars ; unset _histchars; set prompt=\\\$_prompt:q; unset _prompt; test 0 = \\\$_exit' ;
if \\\( \\\$\\\?histchars && \\\! \\\$\\\?prompt \\\) alias module 'set _histcha rs = \\\$histchars; unset histchars; $eval_cmd_csh; set _exit=\"\\\$status\"; se t histchars = \\\$_histchars; unset _histchars; test 0 = \\\$_exit' ; if \\\( \\\$\\\?histchars && \\\! \\\$\\\?prompt \\\) alias module 'set _histcha rs = \\\$histchars; unset histchars; $eval_cmd_csh; set _exit=\"\\\$status\"; se t histchars = \\\$_histchars; unset _histchars; test 0 = \\\$_exit' ;
if \\\( \\\! \\\$\\\?histchars && \\\$\\\?prompt \\\) alias module 'set _prompt= \\\$prompt:q; set prompt=\"\"; $eval_cmd_csh; set _exit=\"\\\$status\"; set prom pt=\\\$_prompt:q; unset _prompt; test 0 = \\\$_exit' ; if \\\( \\\! \\\$\\\?histchars && \\\$\\\?prompt \\\) alias module 'set _prompt= \\\$prompt:q; set prompt=\"\"; $eval_cmd_csh; set _exit=\"\\\$status\"; set prom pt=\\\$_prompt:q; unset _prompt; test 0 = \\\$_exit' ;
if \\\( \\\! \\\$\\\?histchars && \\\! \\\$\\\?prompt \\\) alias module '$eval_c md_csh;' ;" if \\\( \\\! \\\$\\\?histchars && \\\! \\\$\\\?prompt \\\) alias module '$eval_c md_csh;' ;"
set func_tcsh "if \\\( \\\$\\\?histchars && \\\$\\\?prompt \\\) alias module 'se t _histchars = \\\$histchars; unset histchars; set _prompt=\\\$prompt:q; set pro mpt=\"\"; $eval_cmd_tcsh; set _exit=\"\\\$status\"; set histchars = \\\$_histcha rs; unset _histchars; set prompt=\\\$_prompt:q; unset _prompt; test 0 = \\\$_exi t' ; set func_tcsh "if \\\( \\\$\\\?histchars && \\\$\\\?prompt \\\) alias module 'se t _histchars = \\\$histchars; unset histchars; set _prompt=\\\$prompt:q; set pro mpt=\"\"; $eval_cmd_tcsh; set _exit=\"\\\$status\"; set histchars = \\\$_histcha rs; unset _histchars; set prompt=\\\$_prompt:q; unset _prompt; test 0 = \\\$_exi t' ;
if \\\( \\\$\\\?histchars && \\\! \\\$\\\?prompt \\\) alias module 'set _histcha rs = \\\$histchars; unset histchars; $eval_cmd_tcsh; set _exit=\"\\\$status\"; s et histchars = \\\$_histchars; unset _histchars; test 0 = \\\$_exit' ; if \\\( \\\$\\\?histchars && \\\! \\\$\\\?prompt \\\) alias module 'set _histcha rs = \\\$histchars; unset histchars; $eval_cmd_tcsh; set _exit=\"\\\$status\"; s et histchars = \\\$_histchars; unset _histchars; test 0 = \\\$_exit' ;
if \\\( \\\! \\\$\\\?histchars && \\\$\\\?prompt \\\) alias module 'set _prompt= \\\$prompt:q; set prompt=\"\"; $eval_cmd_tcsh; set _exit=\"\\\$status\"; set pro mpt=\\\$_prompt:q; unset _prompt; test 0 = \\\$_exit' ; if \\\( \\\! \\\$\\\?histchars && \\\$\\\?prompt \\\) alias module 'set _prompt= \\\$prompt:q; set prompt=\"\"; $eval_cmd_tcsh; set _exit=\"\\\$status\"; set pro mpt=\\\$_prompt:q; unset _prompt; test 0 = \\\$_exit' ;
if \\\( \\\! \\\$\\\?histchars && \\\! \\\$\\\?prompt \\\) alias module '$eval_c md_tcsh;' ;" if \\\( \\\! \\\$\\\?histchars && \\\! \\\$\\\?prompt \\\) alias module '$eval_c md_tcsh;' ;"
if {$install_quarantinesupport eq y} { if {$install_quarantinesupport eq y} {
skipping to change at line 297 skipping to change at line 306
\\s*if set -q \\\$_mlv \\s*if set -q \\\$_mlv
\\s*set _mlre \\\$_mlre\"__MODULES_QUAR_\"\\\$_mlv\"='\\\$\\\$_mlv' \" \\s*set _mlre \\\$_mlre\"__MODULES_QUAR_\"\\\$_mlv\"='\\\$\\\$_mlv' \"
\\s*end \\s*end
\\s*set _mlrv \"MODULES_RUNENV_\\\$_mlv\" \\s*set _mlrv \"MODULES_RUNENV_\\\$_mlv\"
\\s*set _mlre \"\\\$_mlre\\\$_mlv='\\\$\\\$_mlrv' \" \\s*set _mlre \"\\\$_mlre\\\$_mlv='\\\$\\\$_mlrv' \"
\\s*end \\s*end
\\s*end \\s*end
\\s*if \\\[ -n \"\\\$_mlre\" \\\] \\s*if \\\[ -n \"\\\$_mlre\" \\\]
\\s*set _mlre \"env \\\$_mlre __MODULES_QUARANTINE_SET=1\" \\s*set _mlre \"env \\\$_mlre __MODULES_QUARANTINE_SET=1\"
\\s*end \\s*end
\\s*eval \\\$_mlre $tclshlocre $modulecmd_pathre fish \\\(string escape -- \\\$a rgv\\\) \\\| source - \\s*eval \\\$_mlre $tclshlocre \\\\'$modulecmd_pathre\\\\' fish \\\(string escap e -- \\\$argv\\\) \\\| source -
end$add_func_fish" end$add_func_fish"
set func_tcl "proc module {args} { set func_tcl "proc module {args} {
\\s*set _mlre {}; \\s*set _mlre {};
\\s*if {\\\[info exists ::env\\\(MODULES_RUN_QUARANTINE\\\)\\\]} { \\s*if {\\\[info exists ::env\\\(MODULES_RUN_QUARANTINE\\\)\\\]} {
\\s*foreach _mlv \\\[split \\\$::env\\\(MODULES_RUN_QUARANTINE\\\) \" \"\\\] { \\s*foreach _mlv \\\[split \\\$::env\\\(MODULES_RUN_QUARANTINE\\\) \" \"\\\] {
\\s*if {\\\[regexp {\\\^\\\[A-Za-z_\\\]\\\[A-Za-z0-9_\\\]\\\*\\\$} \\\$_mlv\\\]} { \\s*if {\\\[regexp {\\\^\\\[A-Za-z_\\\]\\\[A-Za-z0-9_\\\]\\\*\\\$} \\\$_mlv\\\]} {
\\s*if {\\\[info exists ::env\\\(\\\$_mlv\\\)\\\]} { \\s*if {\\\[info exists ::env\\\(\\\$_mlv\\\)\\\]} {
\\s*lappend _mlre \"__MODULES_QUAR_\\\${_mlv}=\\\$::env\\\(\\\$_mlv\\\)\" \\s*lappend _mlre \"__MODULES_QUAR_\\\${_mlv}=\\\$::env\\\(\\\$_mlv\\\)\"
\\s*} \\s*}
\\s*set _mlrv \"MODULES_RUNENV_\\\${_mlv}\" \\s*set _mlrv \"MODULES_RUNENV_\\\${_mlv}\"
skipping to change at line 342 skipping to change at line 351
\\s*} \\s*}
\\s*if \\\(\\\$_mlre ne \"\"\\\) { \\s*if \\\(\\\$_mlre ne \"\"\\\) {
\\s*\\\$_mlre = \"env \\\${_mlre}__MODULES_QUARANTINE_SET=1 \"; \\s*\\\$_mlre = \"env \\\${_mlre}__MODULES_QUARANTINE_SET=1 \";
\\s*} \\s*}
\\s*} \\s*}
\\s*my \\\$args = ''; \\s*my \\\$args = '';
\\s*if \\\(\\\@_ > 0\\\) { \\s*if \\\(\\\@_ > 0\\\) {
\\s*\\\$args = '\"' \\\. join\\\('\" \"', \\\@_\\\) \\\. '\"'; \\s*\\\$args = '\"' \\\. join\\\('\" \"', \\\@_\\\) \\\. '\"';
\\s*} \\s*}
\\s*my \\\$_mlstatus = 1; \\s*my \\\$_mlstatus = 1;
\\s*eval `\\\${_mlre}$tclshlocre $modulecmd_pathre perl \\\$args`; \\s*eval `\\\${_mlre}$tclshlocre '$modulecmd_pathre' perl \\\$args`;
\\s*return \\\$_mlstatus; \\s*return \\\$_mlstatus;
}" }"
set func_python "import sys, re, subprocess set func_python "import sys, re, subprocess
def module\\\(\\*arguments\\\): def module\\\(\\*arguments\\\):
\\s*_mlre = os.environ.copy\\\(\\\) \\s*_mlre = os.environ.copy\\\(\\\)
\\s*if 'MODULES_RUN_QUARANTINE' in os.environ: \\s*if 'MODULES_RUN_QUARANTINE' in os.environ:
\\s*for _mlv in os.environ\\\['MODULES_RUN_QUARANTINE'\\\].split\\\(\\\): \\s*for _mlv in os.environ\\\['MODULES_RUN_QUARANTINE'\\\].split\\\(\\\):
\\s*if re.match\\\('\\\^\\\[A-Za-z_\\\]\\\[A-Za-z0-9_\\\]\\\*\\\$', _mlv\\\): \\s*if re.match\\\('\\\^\\\[A-Za-z_\\\]\\\[A-Za-z0-9_\\\]\\\*\\\$', _mlv\\\):
\\s*if _mlv in os.environ: \\s*if _mlv in os.environ:
\\s*_mlre\\\['__MODULES_QUAR_' \\\+ _mlv\\\] = os.environ\\\[_mlv\\\] \\s*_mlre\\\['__MODULES_QUAR_' \\\+ _mlv\\\] = os.environ\\\[_mlv\\\]
skipping to change at line 395 skipping to change at line 404
\\s*end \\s*end
\\s*if args\\\[0\\\].kind_of\\?\\\(Array\\\) then \\s*if args\\\[0\\\].kind_of\\?\\\(Array\\\) then
\\s*args = args\\\[0\\\] \\s*args = args\\\[0\\\]
\\s*end \\s*end
\\s*if args.length == 0 then \\s*if args.length == 0 then
\\s*args = '' \\s*args = ''
\\s*else \\s*else
\\s*args = \"\\\\\"#{args.join\\\('\" \"'\\\)}\\\\\"\" \\s*args = \"\\\\\"#{args.join\\\('\" \"'\\\)}\\\\\"\"
\\s*end \\s*end
\\s*_mlstatus = true \\s*_mlstatus = true
\\s*eval `#{_mlre}$tclshlocre $modulecmd_pathre ruby #{args}` \\s*eval `#{_mlre}$tclshlocre '$modulecmd_pathre' ruby #{args}`
\\s*return _mlstatus \\s*return _mlstatus
\\s*end" \\s*end"
set func_cmake "function\\\(module\\\) set func_cmake "function\\\(module\\\)
\\s*cmake_policy\\\(SET CMP0007 NEW\\\) \\s*cmake_policy\\\(SET CMP0007 NEW\\\)
\\s*set\\\(_mlre \"\"\\\) \\s*set\\\(_mlre \"\"\\\)
\\s*if\\\(DEFINED ENV{MODULES_RUN_QUARANTINE}\\\) \\s*if\\\(DEFINED ENV{MODULES_RUN_QUARANTINE}\\\)
\\s*string\\\(REPLACE \" \" \";\" _mlv_list \"\\\$ENV{MODULES_RUN_QUARANTINE}\"\ \\) \\s*string\\\(REPLACE \" \" \";\" _mlv_list \"\\\$ENV{MODULES_RUN_QUARANTINE}\"\ \\)
\\s*foreach\\\(_mlv \\\${_mlv_list}\\\) \\s*foreach\\\(_mlv \\\${_mlv_list}\\\)
\\s*if\\\(\\\${_mlv} MATCHES \"\\\^\\\[A-Za-z_\\\]\\\[A-Za-z0-9_\\\]\\\*\\\$\"\\ \) \\s*if\\\(\\\${_mlv} MATCHES \"\\\^\\\[A-Za-z_\\\]\\\[A-Za-z0-9_\\\]\\\*\\\$\"\\ \)
\\s*if\\\(DEFINED ENV{\\\${_mlv}}\\\) \\s*if\\\(DEFINED ENV{\\\${_mlv}}\\\)
skipping to change at line 421 skipping to change at line 430
\\s*endforeach\\\(\\\) \\s*endforeach\\\(\\\)
\\s*if \\\(NOT \"\\\${_mlre}\" STREQUAL \"\"\\\) \\s*if \\\(NOT \"\\\${_mlre}\" STREQUAL \"\"\\\)
\\s*set\\\(_mlre \"env;\\\${_mlre}__MODULES_QUARANTINE_SET=1;\"\\\) \\s*set\\\(_mlre \"env;\\\${_mlre}__MODULES_QUARANTINE_SET=1;\"\\\)
\\s*endif\\\(\\\) \\s*endif\\\(\\\)
\\s*endif\\\(\\\) \\s*endif\\\(\\\)
\\s*set\\\(_mlstatus TRUE\\\) \\s*set\\\(_mlstatus TRUE\\\)
\\s*execute_process\\\(COMMAND mktemp -t moduleinit.cmake.XXXXXXXXXXXX \\s*execute_process\\\(COMMAND mktemp -t moduleinit.cmake.XXXXXXXXXXXX
\\s*OUTPUT_VARIABLE tempfile_name \\s*OUTPUT_VARIABLE tempfile_name
\\s*OUTPUT_STRIP_TRAILING_WHITESPACE\\\) \\s*OUTPUT_STRIP_TRAILING_WHITESPACE\\\)
\\s*if\\\(\\\${ARGC} EQUAL 1\\\) \\s*if\\\(\\\${ARGC} EQUAL 1\\\)
\\s*execute_process\\\(COMMAND \\\${_mlre} $tclshlocre $modulecmd_pathre cmake \ "\\\${ARGV0}\" \\s*execute_process\\\(COMMAND \\\${_mlre} $tclshlocre \"$modulecmd_pathre\" cma ke \"\\\${ARGV0}\"
\\s*OUTPUT_FILE \\\${tempfile_name}\\\) \\s*OUTPUT_FILE \\\${tempfile_name}\\\)
\\s*elseif\\\(\\\${ARGC} EQUAL 2\\\) \\s*elseif\\\(\\\${ARGC} EQUAL 2\\\)
\\s*execute_process\\\(COMMAND \\\${_mlre} $tclshlocre $modulecmd_pathre cmake \ "\\\${ARGV0}\" \"\\\${ARGV1}\" \\s*execute_process\\\(COMMAND \\\${_mlre} $tclshlocre \"$modulecmd_pathre\" cma ke \"\\\${ARGV0}\" \"\\\${ARGV1}\"
\\s*OUTPUT_FILE \\\${tempfile_name}\\\) \\s*OUTPUT_FILE \\\${tempfile_name}\\\)
\\s*elseif\\\(\\\${ARGC} EQUAL 3\\\) \\s*elseif\\\(\\\${ARGC} EQUAL 3\\\)
\\s*execute_process\\\(COMMAND \\\${_mlre} $tclshlocre $modulecmd_pathre cmake \ "\\\${ARGV0}\" \"\\\${ARGV1}\" \"\\\${ARGV2}\" \\s*execute_process\\\(COMMAND \\\${_mlre} $tclshlocre \"$modulecmd_pathre\" cma ke \"\\\${ARGV0}\" \"\\\${ARGV1}\" \"\\\${ARGV2}\"
\\s*OUTPUT_FILE \\\${tempfile_name}\\\) \\s*OUTPUT_FILE \\\${tempfile_name}\\\)
\\s*elseif\\\(\\\${ARGC} EQUAL 4\\\) \\s*elseif\\\(\\\${ARGC} EQUAL 4\\\)
\\s*execute_process\\\(COMMAND \\\${_mlre} $tclshlocre $modulecmd_pathre cmake \ "\\\${ARGV0}\" \"\\\${ARGV1}\" \"\\\${ARGV2}\" \"\\\${ARGV3}\" \\s*execute_process\\\(COMMAND \\\${_mlre} $tclshlocre \"$modulecmd_pathre\" cma ke \"\\\${ARGV0}\" \"\\\${ARGV1}\" \"\\\${ARGV2}\" \"\\\${ARGV3}\"
\\s*OUTPUT_FILE \\\${tempfile_name}\\\) \\s*OUTPUT_FILE \\\${tempfile_name}\\\)
\\s*else\\\(\\\) \\s*else\\\(\\\)
\\s*execute_process\\\(COMMAND \\\${_mlre} $tclshlocre $modulecmd_pathre cmake \ \\${ARGV} \\s*execute_process\\\(COMMAND \\\${_mlre} $tclshlocre \"$modulecmd_pathre\" cma ke \\\${ARGV}
\\s*OUTPUT_FILE \\\${tempfile_name}\\\) \\s*OUTPUT_FILE \\\${tempfile_name}\\\)
\\s*endif\\\(\\\) \\s*endif\\\(\\\)
\\s*if\\\(EXISTS \\\${tempfile_name}\\\) \\s*if\\\(EXISTS \\\${tempfile_name}\\\)
\\s*include\\\(\\\${tempfile_name}\\\) \\s*include\\\(\\\${tempfile_name}\\\)
\\s*file\\\(REMOVE \\\${tempfile_name}\\\) \\s*file\\\(REMOVE \\\${tempfile_name}\\\)
\\s*endif\\\(\\\) \\s*endif\\\(\\\)
\\s*set\\\(module_result \\\${_mlstatus} PARENT_SCOPE\\\) \\s*set\\\(module_result \\\${_mlstatus} PARENT_SCOPE\\\)
endfunction\\\(module\\\)" endfunction\\\(module\\\)"
set func_r "module <- function\\\(...\\\){ set func_r "module <- function\\\(...\\\){
\\s*mlre <- '' \\s*mlre <- ''
skipping to change at line 461 skipping to change at line 470
\\s*mlre <- paste0\\\(mlre, mlv, \"='\", Sys.getenv\\\(mlrv\\\), \"' \"\\\) \\s*mlre <- paste0\\\(mlre, mlv, \"='\", Sys.getenv\\\(mlrv\\\), \"' \"\\\)
\\s*} \\s*}
\\s*} \\s*}
\\s*if \\\(mlre \\\!= ''\\\) { \\s*if \\\(mlre \\\!= ''\\\) {
\\s*mlre <- paste0\\\('env ', mlre, '__MODULES_QUARANTINE_SET=1 '\\\) \\s*mlre <- paste0\\\('env ', mlre, '__MODULES_QUARANTINE_SET=1 '\\\)
\\s*} \\s*}
\\s*} \\s*}
\\s*arglist <- as.list\\\(match.call\\\(\\\)\\\) \\s*arglist <- as.list\\\(match.call\\\(\\\)\\\)
\\s*arglist\\\[1\\\] <- 'r' \\s*arglist\\\[1\\\] <- 'r'
\\s*args <- paste0\\\('\"', paste0\\\(arglist, collapse='\" \"'\\\), '\"'\\\) \\s*args <- paste0\\\('\"', paste0\\\(arglist, collapse='\" \"'\\\), '\"'\\\)
\\s*cmd <- paste\\\(mlre, '$tclshlocre', '$modulecmd_pathre', args, sep=' '\\\) \\s*cmd <- paste\\\(mlre, '$tclshlocre', '\"$modulecmd_pathre\"', args, sep=' '\ \\)
\\s*mlstatus <- TRUE \\s*mlstatus <- TRUE
\\s*hndl <- pipe\\\(cmd\\\) \\s*hndl <- pipe\\\(cmd\\\)
\\s*eval\\\(expr = parse\\\(file=hndl\\\)\\\) \\s*eval\\\(expr = parse\\\(file=hndl\\\)\\\)
\\s*close\\\(hndl\\\) \\s*close\\\(hndl\\\)
\\s*invisible\\\(mlstatus\\\) \\s*invisible\\\(mlstatus\\\)
}" }"
} else { } else {
set func_fish "function $func_name set func_fish "function $func_name
\\s*eval $tclshlocre $modulecmd_pathre fish \\\(string escape -- \\\$argv\\\) \\ \| source - \\s*eval $tclshlocre \\\\'$modulecmd_pathre\\\\' fish \\\(string escape -- \\\$a rgv\\\) \\\| source -
end$add_func_fish" end$add_func_fish"
set func_tcl "proc module {args} { set func_tcl "proc module {args} {
\\s*set _mlstatus 1; \\s*set _mlstatus 1;
\\s*catch {exec \"$tclshlocre\" \"$modulecmd_pathre\" \"tcl\" \\\{\\\*\\\}\\\$ar gs 2>@stderr} script \\s*catch {exec \"$tclshlocre\" \"$modulecmd_pathre\" \"tcl\" \\\{\\\*\\\}\\\$ar gs 2>@stderr} script
\\s*eval \\\$script; \\s*eval \\\$script;
\\s*return \\\$_mlstatus \\s*return \\\$_mlstatus
}" }"
set func_perl "sub module { set func_perl "sub module {
\\s*my \\\$args = ''; \\s*my \\\$args = '';
\\s*if \\\(\\\@_ > 0\\\) { \\s*if \\\(\\\@_ > 0\\\) {
\\s*\\\$args = '\"' \\\. join\\\('\" \"', \\\@_\\\) \\\. '\"'; \\s*\\\$args = '\"' \\\. join\\\('\" \"', \\\@_\\\) \\\. '\"';
\\s*} \\s*}
\\s*my \\\$_mlstatus = 1; \\s*my \\\$_mlstatus = 1;
\\s*eval `$tclshlocre $modulecmd_pathre perl \\\$args`; \\s*eval `$tclshlocre '$modulecmd_pathre' perl \\\$args`;
\\s*return \\\$_mlstatus; \\s*return \\\$_mlstatus;
}" }"
set func_python "import sys, re, subprocess set func_python "import sys, re, subprocess
def module\\\(\\*arguments\\\): def module\\\(\\*arguments\\\):
\\s*ns = {} \\s*ns = {}
\\s*out, err = subprocess\\.Popen\\\(\\\['$tclshlocre', '$modulecmd_pathre', 'py thon'\\\] \\+ list\\\(arguments\\\), stdout=subprocess\\.PIPE, stderr=subprocess \\.PIPE\\\)\\.communicate\\\(\\\) \\s*out, err = subprocess\\.Popen\\\(\\\['$tclshlocre', '$modulecmd_pathre', 'py thon'\\\] \\+ list\\\(arguments\\\), stdout=subprocess\\.PIPE, stderr=subprocess \\.PIPE\\\)\\.communicate\\\(\\\)
\\s*exec\\\(out, ns\\\) \\s*exec\\\(out, ns\\\)
\\s*if '_mlstatus' in ns: \\s*if '_mlstatus' in ns:
\\s*_mlstatus = ns\\\['_mlstatus'\\\] \\s*_mlstatus = ns\\\['_mlstatus'\\\]
\\s*else: \\s*else:
skipping to change at line 510 skipping to change at line 519
\\s*def ENVModule.module\\\(\\*args\\\) \\s*def ENVModule.module\\\(\\*args\\\)
\\s*if args\\\[0\\\].kind_of\\?\\\(Array\\\) then \\s*if args\\\[0\\\].kind_of\\?\\\(Array\\\) then
\\s*args = args\\\[0\\\] \\s*args = args\\\[0\\\]
\\s*end \\s*end
\\s*if args.length == 0 then \\s*if args.length == 0 then
\\s*args = '' \\s*args = ''
\\s*else \\s*else
\\s*args = \"\\\\\"#{args.join\\\('\" \"'\\\)}\\\\\"\" \\s*args = \"\\\\\"#{args.join\\\('\" \"'\\\)}\\\\\"\"
\\s*end \\s*end
\\s*_mlstatus = true \\s*_mlstatus = true
\\s*eval `$tclshlocre $modulecmd_pathre ruby #{args}` \\s*eval `$tclshlocre '$modulecmd_pathre' ruby #{args}`
\\s*return _mlstatus \\s*return _mlstatus
\\s*end" \\s*end"
set func_cmake "function\\\(module\\\) set func_cmake "function\\\(module\\\)
\\s*cmake_policy\\\(SET CMP0007 NEW\\\) \\s*cmake_policy\\\(SET CMP0007 NEW\\\)
\\s*set\\\(_mlstatus TRUE\\\) \\s*set\\\(_mlstatus TRUE\\\)
\\s*execute_process\\\(COMMAND mktemp -t moduleinit.cmake.XXXXXXXXXXXX \\s*execute_process\\\(COMMAND mktemp -t moduleinit.cmake.XXXXXXXXXXXX
\\s*OUTPUT_VARIABLE tempfile_name \\s*OUTPUT_VARIABLE tempfile_name
\\s*OUTPUT_STRIP_TRAILING_WHITESPACE\\\) \\s*OUTPUT_STRIP_TRAILING_WHITESPACE\\\)
\\s*if\\\(\\\${ARGC} EQUAL 1\\\) \\s*if\\\(\\\${ARGC} EQUAL 1\\\)
\\s*execute_process\\\(COMMAND $tclshlocre $modulecmd_pathre cmake \"\\\${ARGV0} \" \\s*execute_process\\\(COMMAND $tclshlocre \"$modulecmd_pathre\" cmake \"\\\${AR GV0}\"
\\s*OUTPUT_FILE \\\${tempfile_name}\\\) \\s*OUTPUT_FILE \\\${tempfile_name}\\\)
\\s*elseif\\\(\\\${ARGC} EQUAL 2\\\) \\s*elseif\\\(\\\${ARGC} EQUAL 2\\\)
\\s*execute_process\\\(COMMAND $tclshlocre $modulecmd_pathre cmake \"\\\${ARGV0} \" \"\\\${ARGV1}\" \\s*execute_process\\\(COMMAND $tclshlocre \"$modulecmd_pathre\" cmake \"\\\${AR GV0}\" \"\\\${ARGV1}\"
\\s*OUTPUT_FILE \\\${tempfile_name}\\\) \\s*OUTPUT_FILE \\\${tempfile_name}\\\)
\\s*elseif\\\(\\\${ARGC} EQUAL 3\\\) \\s*elseif\\\(\\\${ARGC} EQUAL 3\\\)
\\s*execute_process\\\(COMMAND $tclshlocre $modulecmd_pathre cmake \"\\\${ARGV0} \" \"\\\${ARGV1}\" \"\\\${ARGV2}\" \\s*execute_process\\\(COMMAND $tclshlocre \"$modulecmd_pathre\" cmake \"\\\${AR GV0}\" \"\\\${ARGV1}\" \"\\\${ARGV2}\"
\\s*OUTPUT_FILE \\\${tempfile_name}\\\) \\s*OUTPUT_FILE \\\${tempfile_name}\\\)
\\s*elseif\\\(\\\${ARGC} EQUAL 4\\\) \\s*elseif\\\(\\\${ARGC} EQUAL 4\\\)
\\s*execute_process\\\(COMMAND $tclshlocre $modulecmd_pathre cmake \"\\\${ARGV0} \" \"\\\${ARGV1}\" \"\\\${ARGV2}\" \"\\\${ARGV3}\" \\s*execute_process\\\(COMMAND $tclshlocre \"$modulecmd_pathre\" cmake \"\\\${AR GV0}\" \"\\\${ARGV1}\" \"\\\${ARGV2}\" \"\\\${ARGV3}\"
\\s*OUTPUT_FILE \\\${tempfile_name}\\\) \\s*OUTPUT_FILE \\\${tempfile_name}\\\)
\\s*else\\\(\\\) \\s*else\\\(\\\)
\\s*execute_process\\\(COMMAND $tclshlocre $modulecmd_pathre cmake \\\${ARGV} \\s*execute_process\\\(COMMAND $tclshlocre \"$modulecmd_pathre\" cmake \\\${ARGV }
\\s*OUTPUT_FILE \\\${tempfile_name}\\\) \\s*OUTPUT_FILE \\\${tempfile_name}\\\)
\\s*endif\\\(\\\) \\s*endif\\\(\\\)
\\s*if\\\(EXISTS \\\${tempfile_name}\\\) \\s*if\\\(EXISTS \\\${tempfile_name}\\\)
\\s*include\\\(\\\${tempfile_name}\\\) \\s*include\\\(\\\${tempfile_name}\\\)
\\s*file\\\(REMOVE \\\${tempfile_name}\\\) \\s*file\\\(REMOVE \\\${tempfile_name}\\\)
\\s*endif\\\(\\\) \\s*endif\\\(\\\)
\\s*set\\\(module_result \\\${_mlstatus} PARENT_SCOPE\\\) \\s*set\\\(module_result \\\${_mlstatus} PARENT_SCOPE\\\)
endfunction\\\(module\\\)" endfunction\\\(module\\\)"
set func_r "module <- function\\\(...\\\){ set func_r "module <- function\\\(...\\\){
\\s*arglist <- as.list\\\(match.call\\\(\\\)\\\) \\s*arglist <- as.list\\\(match.call\\\(\\\)\\\)
\\s*arglist\\\[1\\\] <- 'r' \\s*arglist\\\[1\\\] <- 'r'
\\s*args <- paste0\\\('\"', paste0\\\(arglist, collapse='\" \"'\\\), '\"'\\\) \\s*args <- paste0\\\('\"', paste0\\\(arglist, collapse='\" \"'\\\), '\"'\\\)
\\s*cmd <- paste\\\('$tclshlocre', '$modulecmd_pathre', args, sep=' '\\\) \\s*cmd <- paste\\\('$tclshlocre', '\"$modulecmd_pathre\"', args, sep=' '\\\)
\\s*mlstatus <- TRUE \\s*mlstatus <- TRUE
\\s*hndl <- pipe\\\(cmd\\\) \\s*hndl <- pipe\\\(cmd\\\)
\\s*eval\\\(expr = parse\\\(file=hndl\\\)\\\) \\s*eval\\\(expr = parse\\\(file=hndl\\\)\\\)
\\s*close\\\(hndl\\\) \\s*close\\\(hndl\\\)
\\s*invisible\\\(mlstatus\\\) \\s*invisible\\\(mlstatus\\\)
}" }"
} }
if {$install_ml eq {y} && (!$modrc1_exinstalled || $modspath_exinstalled)} { if {$install_ml eq {y} && !$modrc1_exinstalled} {
append func_sh " append func_sh "
\\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };" \\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };"
append func_bash " append func_bash "
\\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };" \\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };\nexport -f ml;"
append func_bash_quar " append func_bash_quar "
\\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };" \\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };\nexport -f ml;"
append func_bash_silentdbg " append func_bash_silentdbg "
\\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };" \\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };\nexport -f ml;"
append func_ksh " append func_ksh "
\\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };" \\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };"
append func_zsh " append func_zsh "
\\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };" \\s*ml\\\(\\\) { module ml \"\\\$\\\@\"; };"
append func_csh " append func_csh "
\\s*alias ml 'module ml \\\\!\\\*' ;" \\s*alias ml 'module ml \\\\!\\\*' ;"
append func_tcsh " append func_tcsh "
\\s*alias ml 'module ml \\\\!\\\*' ;" \\s*alias ml 'module ml \\\\!\\\*' ;"
append func_fish " append func_fish "
\\s*function ml \\s*function ml
skipping to change at line 605 skipping to change at line 614
\\s*endfunction\\\(ml\\\)" \\s*endfunction\\\(ml\\\)"
append func_r " append func_r "
\\s*ml <- function\\\(...\\\){ \\s*ml <- function\\\(...\\\){
\\s*module\\\('ml', ...\\\) \\s*module\\\('ml', ...\\\)
\\s*}" \\s*}"
} }
append func_ruby { append func_ruby {
end} end}
set lmsourceshpath {}
set change_manpath 0
set extra_sysmanpath 0
if {$install_setmanpath eq {y}} {
# use a fixed initial value for MANPATH when specific configuration files
# are installed to get predictable environment changes
if {$modspath_exinstalled && $modrc1_exinstalled} {
set default_manpath /usr/share/man:/usr/local/share/man
setenv_path_var MANPATH $default_manpath
# when example initrc is installed, set Modules mandir in MANPATH environmen
t
# variable to ensure a predictable result without MANPATH change
} elseif {$initrc_exinstalled} {
set default_manpath $install_mandir
setenv_path_var MANPATH $default_manpath
}
set default_manpath {}
if {$install_usemanpath eq {y}} {
# update PATH if set by autoinit, as it can influence the directory list
# returned by manpath command
if {$install_setbinpath eq {y}} {
setenv_var PATH $install_bindir:$::env(PATH)
}
catch {set default_manpath [exec -ignorestderr 2>/dev/null manpath]}
if {$install_setbinpath eq {y}} {
setenv_var PATH $ORIG_PATH
}
} elseif {[info exists ::env(MANPATH)]} {
set default_manpath $::env(MANPATH)
}
if {$install_mandir ni [split $default_manpath :]} {
set change_manpath 1
if {$install_appendmanpath eq {y}} {
if {![info exists ::env(MANPATH)]} {
set extra_sysmanpath 1
set updatedmanpath :$install_mandir
set lmsourceshpath "append-path MANPATH {} $install_mandir|"
} elseif {$::env(MANPATH) eq {}} {
set updatedmanpath $install_mandir
set lmsourceshpath "setenv MANPATH $install_mandir|"
} elseif {$::env(MANPATH) eq {:}} {
set extra_sysmanpath 1
set updatedmanpath :$install_mandir
set lmsourceshpath "setenv MANPATH :$install_mandir|"
} else {
if {{} in [split $::env(MANPATH) :]} {
set extra_sysmanpath 1
}
set updatedmanpath $::env(MANPATH):$install_mandir
set lmsourceshpath "append-path MANPATH $install_mandir|"
}
} else {
if {![info exists ::env(MANPATH)]} {
set extra_sysmanpath 1
set updatedmanpath $install_mandir:
set lmsourceshpath "prepend-path MANPATH $install_mandir {}|"
} elseif {$::env(MANPATH) eq {}} {
set updatedmanpath $install_mandir
set lmsourceshpath "setenv MANPATH $install_mandir|"
} elseif {$::env(MANPATH) eq {:}} {
set extra_sysmanpath 1
set updatedmanpath $install_mandir:
set lmsourceshpath "setenv MANPATH $install_mandir:|"
} else {
if {{} in [split $::env(MANPATH) :]} {
set extra_sysmanpath 1
}
set updatedmanpath $install_mandir:$::env(MANPATH)
set lmsourceshpath "prepend-path MANPATH $install_mandir|"
}
}
}
}
# setup PATH without Modules bin location
set change_path 0
if {$install_setbinpath eq {y}} {
# when example initrc is installed, set Modules bindir in PATH environment
# variable to ensure a predictable result without PATH change
if {$initrc_exinstalled} {
setenv_var PATH $install_bindir:$::env(PATH)
} else {
set default_path [join [lsearch -all -inline -not [split $::env(PATH) :]
$install_bindir] :]
setenv_var PATH $default_path
set change_path 1
if {$install_appendbinpath eq {y}} {
set updatedpath $default_path:$install_bindir
set lmsourceshpath "append-path PATH $install_bindir|"
} else {
set updatedpath $install_bindir:$default_path
set lmsourceshpath "prepend-path PATH $install_bindir|"
}
}
}
# #
# test autoinit command for the different shells # test autoinit command for the different shells
# #
# setup environment state # setup environment state
setenv_path_var MODULEPATH $modpath.3 setenv_path_var MODULEPATH $modpath.3
setenv_loaded_module [list foo/1.0] [list $modpath.3/foo/1.0] setenv_loaded_module [list foo/1.0] [list $modpath.3/foo/1.0]
# ensure ml is set disabled as if modrc1 initrc were previously evaluated
# since modulepath and modules are loaded, initrc will not be evaluated by autoi
nit
if {$modrc1_exinstalled} {
setenv_var MODULES_ML 0
}
# check various set_shell_startup configs # check various set_shell_startup configs
foreach set_shell_startup [list {} 0 1] { foreach set_shell_startup [list {} 0 1] {
setenv_var MODULES_SET_SHELL_STARTUP $set_shell_startup setenv_var MODULES_SET_SHELL_STARTUP $set_shell_startup
foreach shell $supported_shells { foreach shell $supported_shells {
switch -- $shell { switch -- $shell {
{lisp} { {lisp} {
testouterr_cmd "lisp" "autoinit" "ERR" "$err_lisp" testouterr_cmd "lisp" "autoinit" "ERR" "$err_lisp"
} }
{cmd} { {cmd} {
testouterr_cmd "cmd" "autoinit" "ERR" "$err_cmd" testouterr_cmd "cmd" "autoinit" "ERR" "$err_cmd"
} }
default { default {
set ans [list] set ans [list]
lappend ans [list [set "func_$shell"]] lappend ans [list [set "func_$shell"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change_man
path} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change_pat
h} {
lappend ans [list set PATH $updatedpath]
}
if {[is_real_shell $shell] && ($env(MODULES_SET_SHELL_STARTU P) eq {1} || ($env(MODULES_SET_SHELL_STARTUP) ne {0} && $install_setshellstartup eq {y}))} { if {[is_real_shell $shell] && ($env(MODULES_SET_SHELL_STARTU P) eq {1} || ($env(MODULES_SET_SHELL_STARTUP) ne {0} && $install_setshellstartup eq {y}))} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {[is_real_shell $shell] && ($env(MODULES_SET_SHELL_STARTU P) eq {1} || ($env(MODULES_SET_SHELL_STARTUP) ne {0} && $install_setshellstartup eq {y}))} { if {[is_real_shell $shell] && ($env(MODULES_SET_SHELL_STARTU P) eq {1} || ($env(MODULES_SET_SHELL_STARTUP) ne {0} && $install_setshellstartup eq {y}))} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
if {$shell eq {ksh}} { if {$shell eq {ksh}} {
lappend ans [list set FPATH $install_initdir/ksh-functio ns] lappend ans [list set FPATH $install_initdir/ksh-functio ns]
} }
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} else { } else {
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change_man
path} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change_pat
h} {
lappend ans [list set PATH $updatedpath]
}
if {[is_real_shell $shell] && ($env(MODULES_SET_SHELL_STARTU P) eq {1} || ($env(MODULES_SET_SHELL_STARTUP) ne {0} && $install_setshellstartup eq {y}))} { if {[is_real_shell $shell] && ($env(MODULES_SET_SHELL_STARTU P) eq {1} || ($env(MODULES_SET_SHELL_STARTUP) ne {0} && $install_setshellstartup eq {y}))} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {[is_real_shell $shell] && ($env(MODULES_SET_SHELL_STARTU P) eq {1} || ($env(MODULES_SET_SHELL_STARTUP) ne {0} && $install_setshellstartup eq {y}))} { if {[is_real_shell $shell] && ($env(MODULES_SET_SHELL_STARTU P) eq {1} || ($env(MODULES_SET_SHELL_STARTUP) ne {0} && $install_setshellstartup eq {y}))} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
if {$shell eq {ksh}} { if {$shell eq {ksh}} {
lappend ans [list set FPATH $install_initdir/ksh-functio ns] lappend ans [list set FPATH $install_initdir/ksh-functio ns]
skipping to change at line 680 skipping to change at line 807
setenv_loaded_module foo [list] setenv_loaded_module foo [list]
set ans [list] set ans [list]
# an error is raised but no message is produced # an error is raised but no message is produced
lappend ans [list ERR] lappend ans [list ERR]
lappend ans [list [set "func_bash"]] lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
testouterr_cmd_re bash autoinit $ans {} testouterr_cmd_re bash autoinit $ans {}
# coherent environment state with loaded module that defines volatile components # coherent environment state with loaded module that defines volatile components
setenv_path_var MODULEPATH $modpath.3 setenv_path_var MODULEPATH $modpath.3
setenv_loaded_module [list refresh/4.0] [list $modpath.3/refresh/4.0] setenv_loaded_module [list refresh/4.0] [list $modpath.3/refresh/4.0]
setenv_var __MODULES_LMREFRESH refresh/4.0
set ans [list] set ans [list]
lappend ans [list [set "func_bash"]] lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
lappend ans [list alias alfoo {echo foo4}] lappend ans [list alias alfoo {echo foo4}]
lappend ans [list funcfoo "\\(\\) {" "echo foo4; };" "export -f funcfoo;"] lappend ans [list funcfoo "\\(\\) {" "echo foo4; };" "export -f funcfoo;"]
testouterr_cmd_re bash autoinit $ans {} testouterr_cmd_re bash autoinit $ans {}
# no MODULEPATH defined but a module is loaded fullpath # no MODULEPATH defined but a module is loaded fullpath
unsetenv_path_var MODULEPATH unsetenv_path_var MODULEPATH
setenv_loaded_module [list $modpath.3/refresh/4.0] [list $modpath.3/refresh/4.0] setenv_loaded_module [list $modpath.3/refresh/4.0] [list $modpath.3/refresh/4.0]
setenv_var __MODULES_LMREFRESH $modpath.3/refresh/4.0
set ans [list] set ans [list]
lappend ans [list [set "func_bash"]] lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set MODULEPATH {}] lappend ans [list set MODULEPATH {}]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
lappend ans [list alias alfoo {echo foo4}] lappend ans [list alias alfoo {echo foo4}]
lappend ans [list funcfoo "\\(\\) {" "echo foo4; };" "export -f funcfoo;"] lappend ans [list funcfoo "\\(\\) {" "echo foo4; };" "export -f funcfoo;"]
testouterr_cmd_re bash autoinit $ans {} testouterr_cmd_re bash autoinit $ans {}
# MODULEPATH defined and no module loaded # MODULEPATH defined and no module loaded
setenv_path_var MODULEPATH $modpath.3 setenv_path_var MODULEPATH $modpath.3
unsetenv_loaded_module unsetenv_loaded_module
unsetenv_var __MODULES_LMREFRESH
set ans [list] set ans [list]
lappend ans [list [set "func_bash"]] lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}] lappend ans [list set LOADEDMODULES {}]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
skipping to change at line 781 skipping to change at line 947
# test versioning autoinit when MODULE_VERSION is already defined # test versioning autoinit when MODULE_VERSION is already defined
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
# setup environment state # setup environment state
setenv_var MODULE_VERSION "vers" setenv_var MODULE_VERSION "vers"
setenv_var MODULE_VERSION_STACK "vers" setenv_var MODULE_VERSION_STACK "vers"
set ans [list] set ans [list]
lappend ans [list [set "func_sh"]] lappend ans [list [set "func_sh"]]
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
test_cmd_re "sh" "autoinit" $ans test_cmd_re "sh" "autoinit" $ans
skipping to change at line 808 skipping to change at line 983
setenv_path_var MODULEPATH $modpath.deps setenv_path_var MODULEPATH $modpath.deps
setenv_var __MODULES_LMPREREQ m3&m1 setenv_var __MODULES_LMPREREQ m3&m1
setenv_loaded_module [list m1 m3] [list $modpath.deps/m1 $modpath.deps/m3] [list m1] setenv_loaded_module [list m1 m3] [list $modpath.deps/m1 $modpath.deps/m3] [list m1]
testouterr_cmd sh "save $env(TESTSUITEDIR)/coll14" OK {} testouterr_cmd sh "save $env(TESTSUITEDIR)/coll14" OK {}
# setup environment state # setup environment state
unsetenv_loaded_module unsetenv_loaded_module
unsetenv_path_var MODULEPATH unsetenv_path_var MODULEPATH
unsetenv_var __MODULES_LMPREREQ unsetenv_var __MODULES_LMPREREQ
if {$modrc1_exinstalled} {
unsetenv_var MODULES_ML
}
if {(!$insmodspath || $modspath_exinstalled) && (!$insmodrc || $modrc_exinstalle d || $modrc1_exinstalled || $initrc_exinstalled)} { if {(!$insmodspath || $modspath_exinstalled) && (!$insmodrc || $modrc_exinstalle d || $modrc1_exinstalled || $initrc_exinstalled)} {
foreach shell $supported_shells { foreach shell $supported_shells {
unset -nocomplain notestrun unset -nocomplain notestrun
switch -- $shell { switch -- $shell {
{lisp} { {lisp} {
switch -- "$insmodspath$initrc_exinstalled$modrc1_exinstalled" { switch -- "$insmodspath$initrc_exinstalled$modrc1_exinstalled$mo
010 {set tserr "$tserr_initrc_exinstalled\n$err_lisp"} drc_exinstalled" {
001 - 101 {set tserr "$tserr_initrc1_exinstalled\n$err_lisp" 0001 {set tserr "$tserr_modrc_exinstalled\n$err_lisp"}
} 0100 {set tserr "$tserr_initrc_exinstalled\n$err_lisp"}
0010 - 1010 {set tserr "$tserr_initrc1_exinstalled\n$err_lis
p"}
default {set tserr $err_lisp} default {set tserr $err_lisp}
} }
set ans ERR set ans ERR
} }
{cmd} { {cmd} {
switch -- "$insmodspath$initrc_exinstalled$modrc1_exinstalled" { switch -- "$insmodspath$initrc_exinstalled$modrc1_exinstalled$mo
010 {set tserr "$tserr_initrc_exinstalled\n$err_cmd"} drc_exinstalled" {
001 - 101 {set tserr "$tserr_initrc1_exinstalled\n$err_cmd"} 0001 {set tserr "$tserr_modrc_exinstalled\n$err_cmd"}
0100 {set tserr "$tserr_initrc_exinstalled\n$err_cmd"}
0010 - 1010 {set tserr "$tserr_initrc1_exinstalled\n$err_cmd
"}
default {set tserr $err_cmd} default {set tserr $err_cmd}
} }
set ans ERR set ans ERR
} }
default { default {
set tserr {} set tserr {}
set ans [list] set ans [list]
lappend ans [list [set "func_$shell"]] lappend ans [list [set "func_$shell"]]
if {!$insmodspath && !$insmodrc} { if {!$insmodspath && !$insmodrc} {
if {$install_versioning eq "y"} { if {$shell eq {ksh} && $install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] if {$change_manpath} {
} lappend ans [list set MANPATH $updatedmanpath]
lappend ans [list set MODULES_CMD $modulecmd_path] }
if {[is_real_shell $shell] && $install_setshellstartup eq {y lappend ans [list set LOADEDMODULES ""]
}} { lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set ENV $install_initdir/profile.sh]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {[is_real_shell $shell] && $install_setshellstartup eq {y
}} {
lappend ans [list set BASH_ENV $install_initdir/bash]
}
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES ""]
if {$shell eq {ksh}} {
lappend ans [list set FPATH $install_initdir/ksh-functio
ns]
}
lappend ans [list set MODULEPATH ""]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
if {$shell eq {ksh}} {
lappend ans [list set FPATH $install_initdir/ksh-fun
ctions]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1
]
}
}
lappend ans [list set MODULEPATH {}]
lappend ans [list set __MODULES_LMINIT {}]
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.s
h]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash
]
}
} else {
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change
_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1
]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change
_path} {
lappend ans [list set PATH $updatedpath]
}
if {[is_real_shell $shell] && $install_setshellstartup e
q {y}} {
lappend ans [list set ENV $install_initdir/profile.s
h]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {[is_real_shell $shell] && $install_setshellstartup e
q {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash
]
}
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES ""]
if {$shell eq {ksh}} {
lappend ans [list set FPATH $install_initdir/ksh-fun
ctions]
}
lappend ans [list set __MODULES_LMINIT {}]
lappend ans [list set MODULEPATH ""]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
} }
# cumulative use of modulespath then initrc is both are deployed # cumulative use of modulespath then initrc is both are deployed
} elseif {$modspath_exinstalled && $modrc1_exinstalled} { } elseif {$modspath_exinstalled && $modrc1_exinstalled} {
if {$install_versioning eq "y"} { # specific result order obtained when updating manpath
lappend ans [list set MODULE_VERSION_STACK "(.*)"] if {$shell in {sh bash ksh zsh csh tcsh fish} && $change_man
} path} {
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MANPATH $updatedmanpath]
lappend ans [list set MODULES_SHELLS_WITH_KSH_FPATH "sh:bash lappend ans [list set LOADEDMODULES null]
"] lappend ans [list set MODULESHOME $moduleshome/init]
lappend ans [list set MODULES_ML 0] lappend ans [list set _LMFILES_ "$install_modulefilesdir
lappend ans [list set MODULES_SET_SHELL_STARTUP 0] /null"]
lappend ans [list set MODULES_AUTO_HANDLING 0] if {$install_versioning eq "y"} {
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
lappend ans [list set _LMFILES_ "$install_modulefilesdir/nul }
l"] if {$shell eq {ksh} || $shell eq {sh} || $shell eq {bash
lappend ans [list set MODULESHOME $moduleshome/init] }} {
lappend ans [list set LOADEDMODULES null] lappend ans [list set FPATH $install_initdir/ksh-fun
if {$shell eq {ksh} || $shell eq {sh} || $shell eq {bash}} { ctions]
lappend ans [list set FPATH $install_initdir/ksh-functio }
ns] lappend ans [list set MODULES_CMD $modulecmd_path]
} lappend ans [list set MODULES_AUTO_HANDLING 0]
lappend ans [list set MODULEPATH "$install_modulepath:$insta lappend ans [list set MODULES_ML 0]
ll_prefix/test/modulefiles:$install_prefix/test/etc"] lappend ans [list set MODULEPATH "$install_modulepath:$i
if {$install_versioning eq "y"} { nstall_prefix/test/modulefiles:$install_prefix/test/etc"]
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set __MODULES_LMINIT $lminit_modspath_
modrc1_exinstalled]
lappend ans [list set MODULES_SET_SHELL_STARTUP 0]
lappend ans [list set MODULES_SHELLS_WITH_KSH_FPATH "sh:
bash"]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change
_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
} else {
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list set MODULES_SHELLS_WITH_KSH_FPATH "sh:
bash"]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change
_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list set MODULES_ML 0]
lappend ans [list set MODULES_SET_SHELL_STARTUP 0]
lappend ans [list set MODULES_AUTO_HANDLING 0]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set _LMFILES_ "$install_modulefilesdir
/null"]
lappend ans [list set MODULESHOME $moduleshome/init]
lappend ans [list set LOADEDMODULES null]
if {$shell eq {ksh} || $shell eq {sh} || $shell eq {bash
}} {
lappend ans [list set FPATH $install_initdir/ksh-fun
ctions]
}
lappend ans [list set __MODULES_LMINIT $lminit_modspath_
modrc1_exinstalled]
lappend ans [list set MODULEPATH "$install_modulepath:$i
nstall_prefix/test/modulefiles:$install_prefix/test/etc"]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
} }
set tserr $tserr_initrc1_exinstalled set tserr $tserr_initrc1_exinstalled
} elseif {$modspath_exinstalled} { } elseif {$modspath_exinstalled} {
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change_man
path} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change_pat
h} {
lappend ans [list set PATH $updatedpath]
}
if {[is_real_shell $shell] && $install_setshellstartup eq {y }} { if {[is_real_shell $shell] && $install_setshellstartup eq {y }} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {[is_real_shell $shell] && $install_setshellstartup eq {y }} { if {[is_real_shell $shell] && $install_setshellstartup eq {y }} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES ""] lappend ans [list set LOADEDMODULES ""]
if {$shell eq {ksh}} { if {$shell eq {ksh}} {
lappend ans [list set FPATH $install_initdir/ksh-functio ns] lappend ans [list set FPATH $install_initdir/ksh-functio ns]
} }
lappend ans [list set __MODULES_LMINIT $lminit_modspath_exin stalled]
lappend ans [list set MODULEPATH "$install_modulepath:$insta ll_prefix/test/modulefiles:$install_prefix/test/etc"] lappend ans [list set MODULEPATH "$install_modulepath:$insta ll_prefix/test/modulefiles:$install_prefix/test/etc"]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
} elseif {!$insmodspath && $modrc_exinstalled} { } elseif {!$insmodspath && $modrc_exinstalled} {
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change_man
path} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change_pat
h} {
lappend ans [list set PATH $updatedpath]
}
if {[is_real_shell $shell] && $install_setshellstartup eq {y }} { if {[is_real_shell $shell] && $install_setshellstartup eq {y }} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {[is_real_shell $shell] && $install_setshellstartup eq {y }} { if {[is_real_shell $shell] && $install_setshellstartup eq {y }} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set _LMFILES_ "$install_modulefilesdir/nul l"]
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES "null"]
lappend ans [list set MODULEPATH "$install_modulepath"]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
} elseif {!$insmodspath && $modrc1_exinstalled} {
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set LOADEDMODULES "null"]
lappend ans [list set MODULESHOME $install_initdir]
lappend ans [list set _LMFILES_ "$install_modulefilesdir/nul l"] lappend ans [list set _LMFILES_ "$install_modulefilesdir/nul l"]
if {$shell eq {ksh} || $shell eq {sh} || $shell eq {bash}} { lappend ans [list set LOADEDMODULES "null"]
if {$shell eq {ksh}} {
lappend ans [list set FPATH $install_initdir/ksh-functio ns] lappend ans [list set FPATH $install_initdir/ksh-functio ns]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set __MODULES_LMINIT $lminit_modrc_exinsta
lappend ans [list set MODULES_AUTO_HANDLING 0] lled]
lappend ans [list set MODULES_ML 0]
lappend ans [list set MODULEPATH "$install_modulepath"] lappend ans [list set MODULEPATH "$install_modulepath"]
lappend ans [list set MODULES_SET_SHELL_STARTUP 0]
lappend ans [list set MODULES_SHELLS_WITH_KSH_FPATH "sh:bash
"]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
set tserr $tserr_modrc_exinstalled
} elseif {!$insmodspath && $modrc1_exinstalled} {
# specific result order obtained when updating manpath
if {$shell in {sh bash ksh zsh csh tcsh fish}} {
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set LOADEDMODULES "null"]
lappend ans [list set MODULESHOME $install_initdir]
lappend ans [list set _LMFILES_ "$install_modulefilesdir
/null"]
if {$shell eq {ksh} || $shell eq {sh} || $shell eq {bash
}} {
lappend ans [list set FPATH $install_initdir/ksh-fun
ctions]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change
_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1
]
}
lappend ans [list set MANPATH $updatedmanpath]
}
lappend ans [list set MODULES_AUTO_HANDLING 0]
lappend ans [list set MODULES_ML 0]
lappend ans [list set MODULEPATH "$install_modulepath"]
lappend ans [list set __MODULES_LMINIT $lminit_modrc1_ex
installed]
lappend ans [list set MODULES_SET_SHELL_STARTUP 0]
lappend ans [list set MODULES_SHELLS_WITH_KSH_FPATH "sh:
bash"]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change
_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
} else {
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list set MODULES_SHELLS_WITH_KSH_FPATH "sh:
bash"]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change
_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list set MODULES_ML 0]
lappend ans [list set MODULES_SET_SHELL_STARTUP 0]
lappend ans [list set MODULES_AUTO_HANDLING 0]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set _LMFILES_ "$install_modulefilesdir
/null"]
lappend ans [list set MODULESHOME $moduleshome/init]
lappend ans [list set LOADEDMODULES null]
if {$shell eq {ksh} || $shell eq {sh} || $shell eq {bash
}} {
lappend ans [list set FPATH $install_initdir/ksh-fun
ctions]
}
lappend ans [list set __MODULES_LMINIT $lminit_modrc1_ex
installed]
lappend ans [list set MODULEPATH "$install_modulepath"]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
}
set tserr $tserr_initrc1_exinstalled set tserr $tserr_initrc1_exinstalled
} elseif {!$insmodspath && $initrc_exinstalled && !$install_sets hellstartup} { } elseif {!$insmodspath && $initrc_exinstalled && !$install_sets hellstartup} {
if {$shell eq {python}} { if {$shell eq {python}} {
set ans (.*) set ans (.*)
} elseif {$shell eq {ksh} && $install_versioning} { } elseif {$shell in {zsh ksh} && $install_versioning} {
set notestrun 1 set notestrun 1
} elseif {$shell eq {ksh}} { } elseif {$shell eq {ksh}} {
set ans [list] set ans [list]
lappend ans [list ERR] lappend ans [list ERR]
lappend ans [list [set "func_$shell"]] lappend ans [list [set "func_$shell"]]
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change
_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1
]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$shell in {sh bash ksh zsh csh tcsh fish} && $change
_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMPREREQ m3&m1] lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpa th.deps/m3:$modpath wspace/space yc/4"] lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpa th.deps/m3:$modpath wspace/space yc/4"]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"] lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set FPATH $install_initdir/ksh-functio ns] lappend ans [list set FPATH $install_initdir/ksh-functio ns]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_ex installed]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded] lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULEPATH "$modpath wspace:$modpa th.deps"] lappend ans [list set MODULEPATH "$modpath wspace:$modpa th.deps"]
} else { } else {
set ans [list] set ans [list]
lappend ans [list ERR] lappend ans [list ERR]
lappend ans [list [set "func_$shell"]] lappend ans [list [set "func_$shell"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMPREREQ m3&m1] lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpa th.deps/m3:$modpath wspace/space yc/4"] lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpa th.deps/m3:$modpath wspace/space yc/4"]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"] lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_ex installed]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded] lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULEPATH "$modpath wspace:$modpa th.deps"] lappend ans [list set MODULEPATH "$modpath wspace:$modpa th.deps"]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
} }
set tserr $tserr_initrc_exinstalled set tserr $tserr_initrc_exinstalled
} else { } else {
set notestrun 1 set notestrun 1
} }
skipping to change at line 1007 skipping to change at line 1333
lappend ans [list [set "func_sh"]] lappend ans [list [set "func_sh"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMPREREQ m3&m1] lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modpath wspace/space yc/4"] lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modpath wspace/space yc/4"]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"] lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_exinstalled]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded] lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"] lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
# etc/initrc is preferred over init/modulerc # etc/initrc is preferred over init/modulerc
testouterr_cmd_re sh autoinit $ans $tserr_initrc_exinstalled testouterr_cmd_re sh autoinit $ans $tserr_initrc_exinstalled
# cannot test access if cannot change file permission # cannot test access if cannot change file permission
skipping to change at line 1042 skipping to change at line 1369
change_file_perms $modrc ugo-rx change_file_perms $modrc ugo-rx
set ans [list] set ans [list]
lappend ans [list [set "func_sh"]] lappend ans [list [set "func_sh"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}] lappend ans [list set LOADEDMODULES {}]
lappend ans [list set __MODULES_LMINIT {}]
lappend ans [list set MODULEPATH {}] lappend ans [list set MODULEPATH {}]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
lappend ans [list ERR] lappend ans [list ERR]
testouterr_cmd_re sh autoinit $ans "$error_msgs: Permission denied on '$ modrcre'" testouterr_cmd_re sh autoinit $ans "$error_msgs: Permission denied on '$ modrcre'"
restore_file_perms $modrc restore_file_perms $modrc
} }
# remove temporary init/modulerc # remove temporary init/modulerc
skipping to change at line 1076 skipping to change at line 1404
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"] lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp ath wspace/space yc/4"] lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp ath wspace/space yc/4"]
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded] lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list set __MODULES_SHARE_FOO /foo:2] lappend ans [list set __MODULES_SHARE_FOO /foo:2]
lappend ans [list unset __MODULES_SHARE_BAR] lappend ans [list unset __MODULES_SHARE_BAR]
lappend ans [list set __MODULES_LMPREREQ m3&m1] lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_exinstalled]
lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"] lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"]
# append-path is here treated as the modulefile command and not the sub- command # append-path is here treated as the modulefile command and not the sub- command
# as a result FOO reference counter is increased # as a result FOO reference counter is increased
# it may be preferable not to increase ref counter as we are here in a t op-level evaluation context # it may be preferable not to increase ref counter as we are here in a t op-level evaluation context
lappend ans [list set FOO /foo] lappend ans [list set FOO /foo]
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
# remove-path is here treated as the modulefile command and not the sub- command # remove-path is here treated as the modulefile command and not the sub- command
# as a result BAR is not unset due to the reference counter set to 2 # as a result BAR is not unset due to the reference counter set to 2
# it may be preferable to unset BAR as we are here in a top-level evalua tion context # it may be preferable to unset BAR as we are here in a top-level evalua tion context
lappend ans [list set BAR /bar] lappend ans [list set BAR /bar]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
} else { } else {
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"] lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp ath wspace/space yc/4"] lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp ath wspace/space yc/4"]
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded] lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list set __MODULES_SHARE_FOO /foo:2] lappend ans [list set __MODULES_SHARE_FOO /foo:2]
lappend ans [list unset __MODULES_SHARE_BAR] lappend ans [list unset __MODULES_SHARE_BAR]
lappend ans [list set __MODULES_LMPREREQ m3&m1] lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"] lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_exinstalled]
# append-path is here treated as the modulefile command and not the sub- command # append-path is here treated as the modulefile command and not the sub- command
# as a result FOO reference counter is increased # as a result FOO reference counter is increased
# it may be preferable not to increase ref counter as we are here in a t op-level evaluation context # it may be preferable not to increase ref counter as we are here in a t op-level evaluation context
lappend ans [list set FOO /foo] lappend ans [list set FOO /foo]
# remove-path is here treated as the modulefile command and not the sub- command # remove-path is here treated as the modulefile command and not the sub- command
# as a result BAR is not unset due to the reference counter set to 2 # as a result BAR is not unset due to the reference counter set to 2
# it may be preferable to unset BAR as we are here in a top-level evalua tion context # it may be preferable to unset BAR as we are here in a top-level evalua tion context
lappend ans [list set BAR /bar] lappend ans [list set BAR /bar]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
} }
skipping to change at line 1124 skipping to change at line 1457
lappend ans [list [set "func_$shell"]] lappend ans [list [set "func_$shell"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMPREREQ m3&m1] lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modpath wspace/space yc/4"] lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modpath wspace/space yc/4"]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"] lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_exinstalled]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded] lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"] lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
lappend ans [list ERR] lappend ans [list ERR]
set linenum [expr {[cmpversion $tclsh_version 8.6] == -1 ? 13 : 20}] set linenum [expr {[cmpversion $tclsh_version 8.6] == -1 ? 13 : 20}]
set custom [escre [msg_moderr {module: Command 'refresh' not supported} {mod ule refresh<EXM>} $modrc $linenum { }]] set custom [escre [msg_moderr {module: Command 'refresh' not supported} {mod ule refresh<EXM>} $modrc $linenum { }]]
set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}] \n$custom" set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}] \n$custom"
testouterr_cmd_re sh autoinit $ans $tserr testouterr_cmd_re sh autoinit $ans $tserr
# test impact of quarantine support enablement through initrc config file # reset sub-command cannot be used in initrc
setenv_var TESTSUITE_INITRC quar1 setenv_var TESTSUITE_INITRC subcmd2
set ans [list] set ans [list]
lappend ans [list ERR] lappend ans [list [set "func_$shell"]]
lappend ans [list [set "func_bash_quar"]]
lappend ans [list set MODULES_QUARANTINE_SUPPORT 1]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMPREREQ m3&m1] lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modpath wspace/space yc/4"] lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modpath wspace/space yc/4"]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"] lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_exinstalled]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded] lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"] lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
set linenum [expr {[cmpversion $tclsh_version 8.6] == -1 ? 14 : 21}] lappend ans [list ERR]
set linenum [expr {[cmpversion $tclsh_version 8.6] == -1 ? 13 : 39}]
set custom [escre [msg_moderr {module: Command 'reset' not supported} {modul
e reset<EXM>} $modrc $linenum { }]]
set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n
unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n
load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}]
\n$custom"
testouterr_cmd_re sh autoinit $ans $tserr
# test impact of quarantine support enablement through initrc config file
setenv_var TESTSUITE_INITRC quar1
set ans [list]
lappend ans [list ERR]
lappend ans [list [set "func_bash_quar"]]
if {$install_versioning eq "y"} {
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp
ath wspace/space yc/4"]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set MODULE_VERSION "(.*)"]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list set MODULES_QUARANTINE_SUPPORT 1]
lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_exinstalled]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
} else {
lappend ans [list set MODULES_QUARANTINE_SUPPORT 1]
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp
ath wspace/space yc/4"]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_exinstalled]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"]
}
set custom {module restore unk} set custom {module restore unk}
set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modr c 36 { }]] set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modr c 54 { }]]
set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}] \n$err_path'unk'\n$custom" set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}] \n$err_path'unk'\n$custom"
testouterr_cmd_re bash autoinit $ans $tserr testouterr_cmd_re bash autoinit $ans $tserr
unsetenv_var TESTSUITE_INITRC unsetenv_var TESTSUITE_INITRC
# test impact of quarantine support enablement through initrc config file # test impact of quarantine support enablement through initrc config file
setenv_var TESTSUITE_INITRC silentdbg1 setenv_var TESTSUITE_INITRC silentdbg1
set ans [list] set ans [list]
lappend ans [list ERR] lappend ans [list ERR]
lappend ans [list [set "func_bash_silentdbg"]] lappend ans [list [set "func_bash_silentdbg"]]
lappend ans [list set MODULES_SILENT_SHELL_DEBUG 1]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modpath
wspace/space yc/4"]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp
ath wspace/space yc/4"]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_exinstalled]
lappend ans [list set MODULES_SILENT_SHELL_DEBUG 1]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
} else {
lappend ans [list set MODULES_SILENT_SHELL_DEBUG 1]
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp
ath wspace/space yc/4"]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4"]
lappend ans [list set __MODULES_LMINIT $lminit_initrc_exinstalled]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULEPATH "$modpath wspace:$modpath.deps"]
} }
set linenum [expr {[cmpversion $tclsh_version 8.6] == -1 ? 14 : 21}]
set custom {module restore unk} set custom {module restore unk}
set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modr c 36 { }]] set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modr c 54 { }]]
set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}] \n$err_path'unk'\n$custom" set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}] \n$err_path'unk'\n$custom"
testouterr_cmd_re bash autoinit $ans $tserr testouterr_cmd_re bash autoinit $ans $tserr
unsetenv_var TESTSUITE_INITRC unsetenv_var TESTSUITE_INITRC
# test load in initrc of a modulefile relying on a bash shell script # test load in initrc of a modulefile relying on a bash shell script
# execution when set_shell_startup is enabled # execution when set_shell_startup is enabled
setenv_var TESTSUITE_INITRC inprogress1 setenv_var TESTSUITE_INITRC inprogress1
set ans [list] set ans [list]
skipping to change at line 1220 skipping to change at line 1598
} }
lappend ans [list set __MODULES_LMPREREQ m3&m1] lappend ans [list set __MODULES_LMPREREQ m3&m1]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
if {$install_versioning eq "n"} { if {$install_versioning eq "n"} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
lappend ans [list set MODULEPATH "$modpath.3:$modpath wspace:$modpath.deps"] lappend ans [list set MODULEPATH "$modpath.3:$modpath wspace:$modpath.deps"]
lappend ans [list set __MODULES_LMINIT "module use --append $modpath.3:modul e use --append {$modpath wspace}:module use --append $modpath.deps:module load - -tag=auto-loaded m1:module load m3:module load {space yc/4}:module load refresh/ 5.0"]
lappend ans [list set FOO str:foo] lappend ans [list set FOO str:foo]
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list set MODULES_SET_SHELL_STARTUP 1] lappend ans [list set MODULES_SET_SHELL_STARTUP 1]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
set linenum [expr {[cmpversion $tclsh_version 8.6] == -1 ? 14 : 21}]
set custom {module restore unk} set custom {module restore unk}
set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modr c 36 { }]] set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modr c 54 { }]]
set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}] \n[msg_load {refresh/5.0 <bar>}]\n$err_path'unk'\n$custom" set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}] \n[msg_load {refresh/5.0 <bar>}]\n$err_path'unk'\n$custom"
testouterr_cmd_re bash autoinit $ans $tserr testouterr_cmd_re bash autoinit $ans $tserr
# test module loaded with specific tag and which auto-loads another module
setenv_var TESTSUITE_INITRC tag1
set ans [list]
lappend ans [list ERR]
lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} {
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4:foo/0.2:foo/1.0:fo
o/0.load"]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp
ath wspace/space yc/4:$modpath.3/foo/0.2:$modpath.3/foo/1.0:$modpath.3/foo/0.loa
d"]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set MODULE_VERSION "(.*)"]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded:foo/0.2&tag:foo/1.0
&auto-loaded:foo/0.load&foo]
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list set __MODULES_LMPREREQ m3&m1:foo/0.load&foo/1.0]
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
lappend ans [list set __MODULES_LMALTNAME foo/0.2&foo/sym]
lappend ans [list set MODULEPATH "$modpath.3:$modpath wspace:$modpath.de
ps"]
lappend ans [list set __MODULES_LMINIT "module use --append $modpath.3:m
odule use --append {$modpath wspace}:module use --append $modpath.deps:module lo
ad --tag=auto-loaded m1:module load m3:module load {space yc/4}:module load foo/
0.2:module load --tag=auto-loaded foo/1.0:module load --tag=foo foo/0.load"]
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set __MODULES_LMEXTRATAG foo/0.load&foo]
} else {
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list set __MODULES_LMALTNAME foo/0.2&foo/sym]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMPREREQ m3&m1:foo/0.load&foo/1.0]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp
ath wspace/space yc/4:$modpath.3/foo/0.2:$modpath.3/foo/1.0:$modpath.3/foo/0.loa
d"]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4:foo/0.2:foo/1.0:fo
o/0.load"]
lappend ans [list set __MODULES_LMINIT "module use --append $modpath.3:m
odule use --append {$modpath wspace}:module use --append $modpath.deps:module lo
ad --tag=auto-loaded m1:module load m3:module load {space yc/4}:module load foo/
0.2:module load --tag=auto-loaded foo/1.0:module load --tag=foo foo/0.load"]
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list set __MODULES_LMEXTRATAG foo/0.load&foo]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded:foo/0.2&tag:foo/1.0
&auto-loaded:foo/0.load&foo]
lappend ans [list set MODULEPATH "$modpath.3:$modpath wspace:$modpath.de
ps"]
}
set custom {module restore unk}
set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modr
c 54 { }]]
set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n
unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n
load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}]
\n[msg_load {foo/0.2 <tag>}]\n\n[msg_top_load {foo/0.load <foo>} {} foo/1.0 {}]\
n\n$err_path'unk'\n$custom"
testouterr_cmd_re bash autoinit $ans $tserr
# test with a __MODULES_LMINIT variable already set
setenv_var __MODULES_LMINIT "module use --append $modpath"
testouterr_cmd_re bash autoinit $ans $tserr
unsetenv_var __MODULES_LMINIT
# test module variant defined in initrc
setenv_var TESTSUITE_INITRC variant1
setenv_var TESTSUITE_VARIANT collinitrc
setenv_var MODULES_ADVANCED_VERSION_SPEC 1
set ans [list]
lappend ans [list ERR]
lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} {
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4:variant/1.0"]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp
ath wspace/space yc/4:$modpath.3/variant/1.0"]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set MODULE_VERSION "(.*)"]
lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list set __MODULES_LMVARIANT variant/1.0&foo|1|1|1&bar|val1
|0|0]
lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
lappend ans [list set MODULEPATH "$modpath.3:$modpath wspace:$modpath.de
ps"]
lappend ans [list set __MODULES_LMINIT "module use --append $modpath.3:m
odule use --append {$modpath wspace}:module use --append $modpath.deps:module lo
ad --tag=auto-loaded m1:module load m3:module load {space yc/4}:module load vari
ant/1.0 bar=val1 +foo"]
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
} else {
lappend ans [list set __MODULES_LMVARIANT variant/1.0&foo|1|1|1&bar|val1
|0|0]
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set __MODULES_LMPREREQ m3&m1]
lappend ans [list set _LMFILES_ "$modpath.deps/m1:$modpath.deps/m3:$modp
ath wspace/space yc/4:$modpath.3/variant/1.0"]
lappend ans [list set LOADEDMODULES "m1:m3:space yc/4:variant/1.0"]
lappend ans [list set __MODULES_LMINIT "module use --append $modpath.3:m
odule use --append {$modpath wspace}:module use --append $modpath.deps:module lo
ad --tag=auto-loaded m1:module load m3:module load {space yc/4}:module load vari
ant/1.0 bar=val1 +foo"]
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list set __MODULES_LMTAG m1&auto-loaded]
lappend ans [list set MODULEPATH "$modpath.3:$modpath wspace:$modpath.de
ps"]
}
set custom {module restore unk}
set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modr
c 54 { }]]
set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n
unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n
load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}]
\n[msg_load {variant/1.0{bar=val1:\+foo}}]\n$err_path'unk'\n$custom"
testouterr_cmd_re bash autoinit $ans $tserr
unsetenv_var MODULES_ADVANCED_VERSION_SPEC
unsetenv_var TESTSUITE_VARIANT
# implying reset when restore with no arg and no default collection
# reset to an empty environment (as no initial env recorded yet)
setenv_var TESTSUITE_INITRC restorereset1
set ans [list]
lappend ans [list ERR]
lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list unset __MODULES_LMPREREQ]
lappend ans [list unset _LMFILES_]
lappend ans [list unset LOADEDMODULES]
lappend ans [list set __MODULES_LMINIT {}]
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list unset __MODULES_LMTAG]
lappend ans [list unset MODULEPATH]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
set custom {module restore unk}
set custom [escre [msg_moderr {Collection unk cannot be found} $custom $modr
c 54 { }]]
set tserr "[msg_load mj]\nload m1\nload m2\n\n[msg_top_load m2 {} m1 {}]\n\n
unload m2\n[msg_unload m2]\nunload m1\n[msg_unload {m1 <aL>}]\n[msg_unload mj]\n
load m1\n[msg_load {m1 <aL>}]\nload m3\n[msg_load m3]\n[msg_load {'space yc/4'}]
\n[msg_unload {'space yc/4'}]\nunload m3\n[msg_unload m3]\nunload m1\n[msg_unloa
d {m1 <aL>}]\n$err_path'unk'\n$custom"
testouterr_cmd_re bash autoinit $ans $tserr
# implying reset when restore __init__ (same as above)
setenv_var TESTSUITE_INITRC restorereset2
testouterr_cmd_re bash autoinit $ans $tserr
unsetenv_var TESTSUITE_INITRC unsetenv_var TESTSUITE_INITRC
# save installed initrc as following tests will test specific configuration # save installed initrc as following tests will test specific configuration
file rename -force $modrc $modrc.orig file rename -force $modrc $modrc.orig
set ans [list] set ans [list]
lappend ans [list [set "func_sh"]] lappend ans [list [set "func_sh"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}] lappend ans [list set LOADEDMODULES {}]
lappend ans [list set __MODULES_LMINIT {}]
lappend ans [list set MODULEPATH {}] lappend ans [list set MODULEPATH {}]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
lappend ans [list ERR] lappend ans [list ERR]
# test initrc file without magic cookie # test initrc file without magic cookie
set fid [open $modrc w] set fid [open $modrc w]
puts $fid "module load unk" puts $fid "module load unk"
close $fid close $fid
skipping to change at line 1269 skipping to change at line 1781
puts $fid "#%Module99\nmodule load unk" puts $fid "#%Module99\nmodule load unk"
close $fid close $fid
set tserr [escre [moderr_minverreq $modrc 99]] set tserr [escre [moderr_minverreq $modrc 99]]
testouterr_cmd_re sh autoinit $ans $tserr testouterr_cmd_re sh autoinit $ans $tserr
# restore installed initrc # restore installed initrc
file rename -force $modrc.orig $modrc file rename -force $modrc.orig $modrc
} }
# test source of shell completion file if interactive mode detected
if {$is_stderr_tty && !$modrc1_exinstalled && !$initrc_exinstalled && !$modrc_ex
installed\
&& $install_versioning eq "n"} {
# create a simple init/bash_completion
if {![file exists $install_initdir/bash_completion] && $install_bashcompleti
ondir eq {}} {
set fid [open $install_initdir/bash_completion a]
close $fid
set ans [list]
lappend ans [list [set func_bash]]
lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}]
lappend ans [list set __MODULES_LMINIT {}]
lappend ans [list set MODULEPATH {}]
lappend ans [list source "'$install_initdir/bash_completion';"]
testouterr_cmd_re bash autoinit $ans {}
file delete $install_initdir/bash_completion
}
# create a simple init/tcsh_completion
if {![file exists $install_initdir/tcsh_completion]} {
set fid [open $install_initdir/tcsh_completion a]
close $fid
set ans [list]
lappend ans [list [set func_tcsh]]
lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}]
lappend ans [list set __MODULES_LMINIT {}]
lappend ans [list set MODULEPATH {}]
lappend ans [list source "'$install_initdir/tcsh_completion';"]
testouterr_cmd_re tcsh autoinit $ans {}
file delete $install_initdir/tcsh_completion
}
# create a simple init/fish_completion
if {![file exists $install_initdir/fish_completion] && $install_fishcompleti
ondir eq {}} {
set fid [open $install_initdir/fish_completion a]
close $fid
set ans [list]
lappend ans [list [set func_fish]]
lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}]
lappend ans [list set __MODULES_LMINIT {}]
lappend ans [list set MODULEPATH {}]
lappend ans [list source "'$install_initdir/fish_completion';"]
testouterr_cmd_re fish autoinit $ans {}
file delete $install_initdir/fish_completion
}
} else {
send_user "\tskipping completion script source tests\n"
}
# test precedence of etc/modulespath over init/.modulespath if we are purely tes ting # test precedence of etc/modulespath over init/.modulespath if we are purely tes ting
# (as tests will modify the installation) # (as tests will modify the installation)
# example modulerc/initrc files should not be installed to run the lock tests # example modulerc/initrc files should not be installed to run the lock tests
if {$insmodspath && $modspath_exinstalled && $modspath eq "$install_etcdir/modul espath"\ if {$insmodspath && $modspath_exinstalled && $modspath eq "$install_etcdir/modul espath"\
&& !$modrc_exinstalled && !$modrc1_exinstalled && !$initrc_exinstalled} { && !$modrc_exinstalled && !$modrc1_exinstalled && !$initrc_exinstalled} {
# create a simple init/.modulespath # create a simple init/.modulespath
set fid [open $install_initdir/.modulespath w] set fid [open $install_initdir/.modulespath w]
puts $fid {/unk} puts $fid {/unk}
close $fid close $fid
set ans [list] set ans [list]
lappend ans [list [set "func_sh"]] lappend ans [list [set "func_sh"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES ""] lappend ans [list set LOADEDMODULES ""]
lappend ans [list set __MODULES_LMINIT $lminit_modspath_exinstalled]
lappend ans [list set MODULEPATH "$install_modulepath:$install_prefix/test/m odulefiles:$install_prefix/test/etc"] lappend ans [list set MODULEPATH "$install_modulepath:$install_prefix/test/m odulefiles:$install_prefix/test/etc"]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
} }
# etc/modulespath is preferred over init/.modulespath # etc/modulespath is preferred over init/.modulespath
testouterr_cmd_re sh autoinit $ans {} testouterr_cmd_re sh autoinit $ans {}
# cannot test access if cannot change file permission # cannot test access if cannot change file permission
if {!$is_file_perms_editable} { if {!$is_file_perms_editable} {
skipping to change at line 1322 skipping to change at line 1934
# same if init/.modulespath cannot be read # same if init/.modulespath cannot be read
change_file_perms $install_initdir/.modulespath ugo-rx change_file_perms $install_initdir/.modulespath ugo-rx
testouterr_cmd_re sh autoinit $ans {} testouterr_cmd_re sh autoinit $ans {}
restore_file_perms $install_initdir/.modulespath restore_file_perms $install_initdir/.modulespath
# init/.modulespath ignored even if etc/modulespath locked # init/.modulespath ignored even if etc/modulespath locked
change_file_perms $install_etcdir/modulespath ugo-rx change_file_perms $install_etcdir/modulespath ugo-rx
set ans [list] set ans [list]
lappend ans [list [set "func_sh"]] lappend ans [list [set "func_sh"]]
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}] lappend ans [list set LOADEDMODULES {}]
lappend ans [list set __MODULES_LMINIT {}]
lappend ans [list set MODULEPATH {}] lappend ans [list set MODULEPATH {}]
testouterr_cmd_re sh autoinit $ans {} testouterr_cmd_re sh autoinit $ans {}
restore_file_perms $install_etcdir/modulespath restore_file_perms $install_etcdir/modulespath
} }
# remove temporary init/modulerc # remove temporary init/modulerc
file delete $install_initdir/.modulespath file delete $install_initdir/.modulespath
} }
# ensure ml is set disabled as if modrc1 initrc were previously evaluated
# since modulepath and modules are loaded, initrc will not be evaluated by autoi
nit
if {$modrc1_exinstalled} {
setenv_var MODULES_ML 0
}
# test autoinit infinie loop safeguard mechanism # test autoinit infinie loop safeguard mechanism
if {[file executable /bin/bash]} { if {[file executable /bin/bash]} {
# build temporary specific init file # build temporary specific init file
set initbash $env(TESTSUITEDIR)/initbash set initbash $env(TESTSUITEDIR)/initbash
set fid [open $initbash w] set fid [open $initbash w]
puts $fid "eval \$($TCLSH $modulecmd_path bash autoinit)" puts $fid "eval \$($TCLSH $modulecmd_path bash autoinit)"
close $fid close $fid
# set env with loaded module that triggers run of a bash script to set an # set env with loaded module that triggers run of a bash script to set an
# environment value, as BASH_ENV is set, the autoinit run when bash script # environment value, as BASH_ENV is set, the autoinit run when bash script
skipping to change at line 1361 skipping to change at line 1989
setenv_var BASH_ENV $initbash setenv_var BASH_ENV $initbash
setenv_path_var MODULEPATH $modpath.3 setenv_path_var MODULEPATH $modpath.3
setenv_loaded_module [list refresh/5.0] [list $modpath.3/refresh/5.0] setenv_loaded_module [list refresh/5.0] [list $modpath.3/refresh/5.0]
set ans [list] set ans [list]
lappend ans [list [set "func_bash"]] lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"] lappend ans [list set MODULE_VERSION "(.*)"]
skipping to change at line 1389 skipping to change at line 2026
setenv_var __MODULES_AUTOINIT_INPROGRESS 0 setenv_var __MODULES_AUTOINIT_INPROGRESS 0
setenv_path_var MODULEPATH $modpath.3 setenv_path_var MODULEPATH $modpath.3
unsetenv_loaded_module unsetenv_loaded_module
set ans [list] set ans [list]
lappend ans [list [set "func_bash"]] lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"] lappend ans [list set MODULE_VERSION_STACK "(.*)"]
} }
lappend ans [list set MODULES_CMD $modulecmd_path] lappend ans [list set MODULES_CMD $modulecmd_path]
if {$change_manpath} {
if {$extra_sysmanpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
}
lappend ans [list set MANPATH $updatedmanpath]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh] lappend ans [list set ENV $install_initdir/profile.sh]
} }
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS] lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} { if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash] lappend ans [list set BASH_ENV $install_initdir/bash]
} }
lappend ans [list set MODULESHOME $moduleshome] lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}] lappend ans [list set LOADEDMODULES {}]
if {$install_versioning eq "y"} { if {$install_versioning eq "y"} {
skipping to change at line 1410 skipping to change at line 2056
} }
testouterr_cmd_re bash autoinit $ans {} testouterr_cmd_re bash autoinit $ans {}
setenv_var __MODULES_AUTOINIT_INPROGRESS foo setenv_var __MODULES_AUTOINIT_INPROGRESS foo
testouterr_cmd_re bash autoinit $ans {} testouterr_cmd_re bash autoinit $ans {}
setenv_var __MODULES_AUTOINIT_INPROGRESS 1 setenv_var __MODULES_AUTOINIT_INPROGRESS 1
testouterr_cmd_re bash autoinit {} {} testouterr_cmd_re bash autoinit {} {}
unsetenv_var __MODULES_AUTOINIT_INPROGRESS unsetenv_var __MODULES_AUTOINIT_INPROGRESS
# test MANPATH setup depending on MANPATH initial value
if {$install_setmanpath eq {y}} {
unsetenv_var MANPATH
set mandir_found_by_manpath 0
if {$install_usemanpath eq {y}} {
# update PATH if set by autoinit, as it can influence the directory list
# returned by manpath command
if {$install_setbinpath eq {y}} {
set PREVIOUS_PATH $::env(PATH)
setenv_var PATH $install_bindir:$PREVIOUS_PATH
}
set manpath_mandir_list {}
catch {set manpath_mandir_list [exec -ignorestderr 2>/dev/null manpath]}
if {$install_setbinpath eq {y}} {
setenv_var PATH $PREVIOUS_PATH
}
if {$install_mandir in [split $manpath_mandir_list :]} {
set mandir_found_by_manpath 1
}
}
setenv_var MANPATH {}
set ans [list]
lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
if {!$mandir_found_by_manpath} {
lappend ans [list set MANPATH $install_mandir]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash]
}
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
testouterr_cmd_re bash autoinit $ans {}
setenv_var MANPATH :
set ans [list]
lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
if {!$mandir_found_by_manpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
if {$install_appendmanpath eq {y}} {
lappend ans [list set MANPATH :$install_mandir]
} else {
lappend ans [list set MANPATH $install_mandir:]
}
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash]
}
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
testouterr_cmd_re bash autoinit $ans {}
setenv_var MANPATH :/path
set ans [list]
lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
if {!$mandir_found_by_manpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
if {$install_appendmanpath eq {y}} {
lappend ans [list set MANPATH :/path:$install_mandir]
} else {
lappend ans [list set MANPATH ${install_mandir}::/path]
}
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash]
}
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
testouterr_cmd_re bash autoinit $ans {}
setenv_var MANPATH /path:
set ans [list]
lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
if {!$mandir_found_by_manpath} {
lappend ans [list set __MODULES_SHARE_MANPATH :1]
if {$install_appendmanpath eq {y}} {
lappend ans [list set MANPATH /path::$install_mandir]
} else {
lappend ans [list set MANPATH $install_mandir:/path:]
}
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash]
}
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
testouterr_cmd_re bash autoinit $ans {}
setenv_var MANPATH /path1:/path2
set ans [list]
lappend ans [list [set "func_bash"]]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION_STACK "(.*)"]
}
lappend ans [list set MODULES_CMD $modulecmd_path]
if {$install_appendmanpath eq {y}} {
lappend ans [list set MANPATH /path1:/path2:$install_mandir]
} else {
lappend ans [list set MANPATH $install_mandir:/path1:/path2]
}
if {$change_path} {
lappend ans [list set PATH $updatedpath]
}
if {$install_setshellstartup eq {y}} {
lappend ans [list set ENV $install_initdir/profile.sh]
}
lappend ans [list unset __MODULES_AUTOINIT_INPROGRESS]
if {$install_setshellstartup eq {y}} {
lappend ans [list set BASH_ENV $install_initdir/bash]
}
lappend ans [list set MODULESHOME $moduleshome]
lappend ans [list set LOADEDMODULES {}]
if {$install_versioning eq "y"} {
lappend ans [list set MODULE_VERSION "(.*)"]
}
testouterr_cmd_re bash autoinit $ans {}
unsetenv_var MANPATH
}
if {$modrc1_exinstalled} {
unsetenv_var MODULES_ML
}
# remove temporary collection created for test # remove temporary collection created for test
file delete $env(TESTSUITEDIR)/coll14 file delete $env(TESTSUITEDIR)/coll14
if {$install_setbinpath eq {y}} {
setenv_var PATH $ORIG_PATH
}
# #
# Cleanup # Cleanup
# #
reset_test_env reset_test_env
 End of changes. 103 change blocks. 
152 lines changed or deleted 1094 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)