Skip to content

Commit

Permalink
Adding patch to enable "depends-on" keyword support for tcl modulefil…
Browse files Browse the repository at this point in the history
…e parsing

via Lmod (#495)
  • Loading branch information
koomie committed Jul 27, 2017
1 parent 265999e commit ed8da80
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
28 changes: 28 additions & 0 deletions components/admin/lmod/SOURCES/depends_on.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/src/tcl2lua.tcl b/src/tcl2lua.tcl
index ffacabc0..20e80c05 100755
--- a/src/tcl2lua.tcl
+++ b/src/tcl2lua.tcl
@@ -543,11 +543,14 @@ proc cmdargs { cmd args } {
set cmdArgs [join $cmdArgsL ","]
puts stdout "$cmd\($cmdArgs\)"
}
+
+proc depends-on { args} {
+ eval cmdargs "depends_on" $args
+}
proc family { var } {
cmdargs "family" $var
}

-
proc loadcmd { args } {
eval cmdargs "load" $args
}
@@ -753,6 +756,7 @@ proc execute-modulefile {modfile } {

if {![interp exists $slave]} {
interp create $slave
+ interp alias $slave depends-on {} depends-on
interp alias $slave family {} family
interp alias $slave setenv {} setenv
interp alias $slave pushenv {} pushenv
2 changes: 2 additions & 0 deletions components/admin/lmod/SPECS/lmod.spec
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Patch1: lmod.consulting.patch
Patch2: lmod.site.patch
# 4/25/17 [email protected] - upping patch fuzz factor for newer lmod
%global _default_patch_fuzz 2
# 7/27/17 [email protected] - patch to enable depends_on support for tcl modules
Patch3: depends_on.patch

# Known dependencies
Requires: lua >= %{luaver}
Expand Down

0 comments on commit ed8da80

Please sign in to comment.