|
From: Jeff S. <jsq...@us...> - 2004-03-08 18:09:53
|
Update of /cvsroot/env-switcher/env-switcher/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5745/src Modified Files: switcher.tcl.in Log Message: Not only did the last commit break abstraction and unload modules-oscar (which switcher should know nothing about), it didn't even work because unloading the switcher module will only unload modules that switcher is currently set to load. Hence, the following would not work: module mpi = some-new-value switcher-reload In fact, you'd probably get an error because switcher would then try to load the mpi module some-new-value -- without unloading the old mpi module first. This would inevitably cause a conflict and things would go downhill from there. So now switcher-reload forcibly unloads everything from under SWITCHER_PKGDATADIR and then unloads the switcher module (which will try to module unload everything that it knows about, which is ok -- they fail silently), and then re-loads the switcher module. RFE 905191 solved. :-) Index: switcher.tcl.in =================================================================== RCS file: /cvsroot/env-switcher/env-switcher/src/switcher.tcl.in,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** switcher.tcl.in 8 Mar 2004 16:44:52 -0000 1.13 --- switcher.tcl.in 8 Mar 2004 17:45:23 -0000 1.14 *************** *** 76,80 **** # be what the current switcher settings are. ! alias switcher-reload "module unload oscar-modules; module load oscar-modules" # If we're not removing the module, call switcher to announce what --- 76,80 ---- # be what the current switcher settings are. ! set-alias switcher-reload "cd @SWITCHER_PKGDATADIR@ > /dev/null ; module unload */* ; module load switcher ; cd - > /dev/null" # If we're not removing the module, call switcher to announce what |