From 6b4be820492a1c88a48895e9264e83d7f10451e4 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 13 Jul 2015 14:37:35 -0600 Subject: [PATCH] Add patch to fix unload from loaded modulefile (bug #1117334) --- ...nt-modules-3.2.10-unload-from-module.patch | 24 +++++++++++++++++++ environment-modules.spec | 9 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 environment-modules-3.2.10-unload-from-module.patch diff --git a/environment-modules-3.2.10-unload-from-module.patch b/environment-modules-3.2.10-unload-from-module.patch new file mode 100644 index 0000000..c848752 --- /dev/null +++ b/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; ++ } + } + + /** diff --git a/environment-modules.spec b/environment-modules.spec index 5b087f3..c8770af 100644 --- a/environment-modules.spec +++ b/environment-modules.spec @@ -2,7 +2,7 @@ Name: environment-modules Version: 3.2.10 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Provides dynamic modification of a user's environment Group: System Environment/Base @@ -33,6 +33,9 @@ Patch5: environment-modules-tcl86.patch # https://sourceforge.net/p/modules/patches/15/ # https://bugzilla.redhat.com/show_bug.cgi?id=1184979 Patch6: environment-modules-py3-and-doc-fix.patch +# Fix unload from loaded modulefile +# https://bugzilla.redhat.com/show_bug.cgi?id=1117334 +Patch7: environment-modules-3.2.10-unload-from-module.patch BuildRequires: tcl-devel, tclx-devel, libX11-devel BuildRequires: dejagnu @@ -77,6 +80,7 @@ have access to the module alias. %patch4 -p1 -b .format %patch5 -p1 -b .tcl86 %patch6 -p1 -b .py3 +%patch7 -p1 -b .unload-from-module %build @@ -140,6 +144,9 @@ fi %changelog +* Mon Jul 13 2015 Orion Poplwski - 3.2.10-16 +- Add patch to fix unload from loaded modulefile (bug #1117334) + * Wed Jun 17 2015 Fedora Release Engineering - 3.2.10-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild