import environment-modules-4.5.2-2.el8
This commit is contained in:
parent
48b3121c21
commit
a7a8aaa8ca
44
SOURCES/environment-modules-moulespath-initrc.patch
Normal file
44
SOURCES/environment-modules-moulespath-initrc.patch
Normal file
@ -0,0 +1,44 @@
|
||||
diff --git a/modules-4.5.2/modulecmd.tcl.in b/modulecmd.tcl.in
|
||||
index 3abd4ad..cf6cb3b 100644
|
||||
--- a/modules-4.5.2/modulecmd.tcl.in
|
||||
+++ b/modulecmd.tcl.in
|
||||
@@ -10564,8 +10564,17 @@ proc cmdModuleAutoinit {} {
|
||||
@VERSIONING@ setenv MODULE_VERSION_STACK @MODULES_RELEASE@@MODULES_BUILD@
|
||||
@VERSIONING@}
|
||||
|
||||
- # initialize default MODULEPATH and LOADEDMODULES
|
||||
- if {![info exists ::env(MODULEPATH)] || $::env(MODULEPATH) eq {}} {
|
||||
+ # initialize MODULEPATH and LOADEDMODULES if found unset
|
||||
+ if {![info exists ::env(MODULEPATH)]} {
|
||||
+ setenv MODULEPATH {}
|
||||
+ }
|
||||
+ if {![info exists ::env(LOADEDMODULES)]} {
|
||||
+ setenv LOADEDMODULES {}
|
||||
+ }
|
||||
+
|
||||
+ # initialize user environment if found undefined (both MODULEPATH and
|
||||
+ # LOADEDMODULES empty)
|
||||
+ if {$::env(MODULEPATH) eq {} && $::env(LOADEDMODULES) eq {}} {
|
||||
# set modpaths defined in modulespath config file if it exists, use file
|
||||
# in etcdir if it exists, dot file in initdir elsewhere
|
||||
set modulespath [expr {[file exists @etcdir@/modulespath] ?\
|
||||
@@ -10580,17 +10589,8 @@ proc cmdModuleAutoinit {} {
|
||||
}
|
||||
}
|
||||
|
||||
- if {![info exists ::env(MODULEPATH)]} {
|
||||
- setenv MODULEPATH {}
|
||||
- }
|
||||
- }
|
||||
- if {![info exists ::env(LOADEDMODULES)]} {
|
||||
- setenv LOADEDMODULES {}
|
||||
- }
|
||||
-
|
||||
- # source initialization modulerc if any and if no env already initialized
|
||||
- # use initrc file in etcdir if any, modulerc file in initdir otherwise
|
||||
- if {$::env(MODULEPATH) eq {} && $::env(LOADEDMODULES) eq {}} {
|
||||
+ # source initialization modulerc if any and if no env already initialized
|
||||
+ # use initrc file in etcdir if any, modulerc file in initdir otherwise
|
||||
set initrc [expr {[file exists @etcdir@/initrc] ? {@etcdir@/initrc} :\
|
||||
{@initdir@/modulerc}}]
|
||||
if {[file exists $initrc]} {
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name: environment-modules
|
||||
Version: 4.5.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Provides dynamic modification of a user's environment
|
||||
|
||||
Group: System Environment/Base
|
||||
@ -11,6 +11,7 @@ License: GPLv2+
|
||||
URL: http://modules.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/modules/modules-%{version}.tar.bz2
|
||||
Patch0001: environment-modules-configure.patch
|
||||
Patch0002: environment-modules-moulespath-initrc.patch
|
||||
|
||||
BuildRequires: tcl-devel, libX11-devel
|
||||
BuildRequires: dejagnu, sed, procps, hostname, man, less
|
||||
@ -57,8 +58,7 @@ This package provides Environment Modules compatibility version (3.2).
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n modules-%{version}
|
||||
%patch0001 -p1
|
||||
%autosetup -n modules-%{version}
|
||||
|
||||
|
||||
%build
|
||||
@ -191,6 +191,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jun 07 2022 Lukáš Zaoral <lzaoral@redhat.com> - 4.5.2-2
|
||||
- Evaluate both modulespath and initrc during initialization (#1894870)
|
||||
|
||||
* Tue Aug 18 2020 Jan Synáček <jsynacek@redhat.com> - 4.5.2-1
|
||||
- Update to 4.5.2 (#1860674)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user