From 4bd31f0da05570e94b4d17c4de8f5cfe75fa65ca Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 17 Mar 2016 06:44:29 +0100 Subject: environment-modules: import from RHEL --- ...ronment-modules-3.2.10-unload-from-module.patch | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 el6/environment-modules-3.2.10-unload-from-module.patch (limited to 'el6/environment-modules-3.2.10-unload-from-module.patch') diff --git a/el6/environment-modules-3.2.10-unload-from-module.patch b/el6/environment-modules-3.2.10-unload-from-module.patch new file mode 100644 index 0000000..c848752 --- /dev/null +++ b/el6/environment-modules-3.2.10-unload-from-module.patch @@ -0,0 +1,24 @@ +diff -up modules-3.2.10/ModuleCmd_Load.c.unload_from_modulefile modules-3.2.10/ModuleCmd_Load.c +--- modules-3.2.10/ModuleCmd_Load.c.unload_from_modulefile 2014-07-08 10:43:41.615212949 +0200 ++++ modules-3.2.10/ModuleCmd_Load.c 2014-07-08 13:49:21.674701003 +0200 +@@ -126,7 +126,7 @@ int ModuleCmd_Load( Tcl_Interp *interp, + ** Set up the flags controling the Tcl callback functions + **/ + +- /* avoid changes when invoked as a subcommand */ ++ /* avoid changes when invoked as a subcommand and loading */ + if (!(g_flags & M_SUBCMD)) { + if( load) { + g_flags |= M_LOAD; +@@ -136,6 +136,11 @@ int ModuleCmd_Load( Tcl_Interp *interp, + g_flags &= ~M_LOAD; + } + g_flags |= M_SUBCMD; ++ } else { ++ if (!load) { ++ g_flags |= M_REMOVE; ++ g_flags &= ~M_LOAD; ++ } + } + + /** -- cgit