File: paths.patch

package info (click to toggle)
modules 5.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,036 kB
  • sloc: exp: 79,659; sh: 6,142; tcl: 5,900; makefile: 1,492; ansic: 474; python: 265; csh: 202; perl: 47; ruby: 44; lisp: 13
file content (127 lines) | stat: -rw-r--r-- 5,588 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Author: Alastair McKinstry <mckinstry@debian.org>
Description: Fix paths as used in Debian
Last-Updated: 2017-12-05
Forwarded: not-needed

Index: modules-4.1.1/init/bash.in
===================================================================
--- modules-4.1.1.orig/init/bash.in
+++ modules-4.1.1/init/bash.in
@@ -66,13 +66,13 @@ export -f module
 @compatversion@   typeset swfound=1
 @compatversion@   if [ "${MODULES_USE_COMPAT_VERSION:-0}" = '1' ]; then
 @compatversion@      typeset swname='main'
-@compatversion@      if [ -e @libexecdir@/modulecmd.tcl ]; then
+@compatversion@      if [ -e /usr/lib/modulecmd.tcl ]; then
 @compatversion@         typeset swfound=0
 @compatversion@         unset MODULES_USE_COMPAT_VERSION
 @compatversion@      fi
 @compatversion@   else
 @compatversion@      typeset swname='compatibility'
-@compatversion@      if [ -e @libexecdir@/modulecmd-compat ]; then
+@compatversion@      if [ -e /usr/lib/modulecmd-compat ]; then
 @compatversion@         typeset swfound=0
 @compatversion@         MODULES_USE_COMPAT_VERSION=1; export MODULES_USE_COMPAT_VERSION
 @compatversion@      fi
@@ -81,7 +81,7 @@ export -f module
 @compatversion@   # switch version only if command found
 @compatversion@   if [ $swfound -eq 0 ]; then
 @compatversion@      echo "Switching to Modules $swname version"
-@compatversion@      source @initdir@/bash
+@compatversion@      source /usr/share/modules/init/bash
 @compatversion@   else
 @compatversion@      echo "Cannot switch to Modules $swname version, command not found"
 @compatversion@      return 1
@@ -92,13 +92,13 @@ export -f module
 # setup ENV variables to get module defined in sub-shells (works for 'sh'
 # and 'ksh' in interactive mode and 'sh' (zsh-compat), 'bash' and 'ksh'
 # (zsh-compat) in non-interactive mode.
-ENV=@initdir@/profile.sh; export ENV
-BASH_ENV=@initdir@/bash; export BASH_ENV
+ENV=/usr/share/modules/init/profile.sh; export ENV
+BASH_ENV=/usr/share/modules/init/bash; export BASH_ENV
 
 # enable completion only in interactive mode
 if [ ${BASH_VERSINFO:-0} -ge 3 ] && [[ $- =~ i ]] &&
-   [ -r @initdir@/bash_completion ]; then
-   source @initdir@/bash_completion
+   [ -r /usr/share/modules/init/bash_completion ]; then
+   source /usr/share/modules/init/bash_completion
 fi
 
 @setbinpath@if [[ ! ":$PATH:" =~ ':@bindir@:' ]]; then
Index: modules-4.1.1/init/sh.in
===================================================================
--- modules-4.1.1.orig/init/sh.in
+++ modules-4.1.1/init/sh.in
@@ -68,13 +68,13 @@ fi
 @compatversion@   swfound=1
 @compatversion@   if [ "${MODULES_USE_COMPAT_VERSION:-0}" = '1' ]; then
 @compatversion@      swname='main'
-@compatversion@      if [ -e @libexecdir@/modulecmd.tcl ]; then
+@compatversion@      if [ -e /usr/lib/modulecmd.tcl ]; then
 @compatversion@         swfound=0
 @compatversion@         unset MODULES_USE_COMPAT_VERSION
 @compatversion@      fi
 @compatversion@   else
 @compatversion@      swname='compatibility'
-@compatversion@      if [ -e @libexecdir@/modulecmd-compat ]; then
+@compatversion@      if [ -e /usr/lib/modulecmd-compat ]; then
 @compatversion@         swfound=0
 @compatversion@         MODULES_USE_COMPAT_VERSION=1; export MODULES_USE_COMPAT_VERSION
 @compatversion@      fi
@@ -83,7 +83,7 @@ fi
 @compatversion@   # switch version only if command found
 @compatversion@   if [ $swfound -eq 0 ]; then
 @compatversion@      echo "Switching to Modules $swname version"
-@compatversion@      . @initdir@/sh
+@compatversion@      . /usr/share/modules/init/sh
 @compatversion@   else
 @compatversion@      echo "Cannot switch to Modules $swname version, command not found"
 @compatversion@      return 1
@@ -96,8 +96,8 @@ fi
 # setup ENV variables to get module defined in sub-shells (works for 'sh'
 # and 'ksh' in interactive mode and 'sh' (zsh-compat), 'bash' and 'ksh'
 # (zsh-compat) in non-interactive mode.
-ENV=@initdir@/profile.sh; export ENV
-BASH_ENV=@initdir@/bash; export BASH_ENV
+ENV=/usr/share/modules/init/profile.sh; export ENV
+BASH_ENV=/usr/share/modules/init/bash; export BASH_ENV
 
 @setbinpath@case ":$PATH:" in
 @setbinpath@   *:@bindir@:*) ;;
Index: modules-4.1.1/modulecmd.tcl.in
===================================================================
--- modules-4.1.1.orig/modulecmd.tcl.in
+++ modules-4.1.1/modulecmd.tcl.in
@@ -6077,7 +6077,7 @@ proc cmdModuleAutoinit {} {
    pushMode "load"
 
    # default MODULESHOME
-   setenv MODULESHOME "@prefix@"
+   setenv MODULESHOME "/usr/share/modules"
 
    # register command location
    setenv MODULES_CMD [getAbsolutePath $argv0]
@@ -6091,8 +6091,8 @@ proc cmdModuleAutoinit {} {
    # initialize default MODULEPATH and LOADEDMODULES
    if {![info exists env(MODULEPATH)] || $env(MODULEPATH) eq ""} {
       # set modpaths defined in .modulespath config file if it exists
-      if {[file readable "@initdir@/.modulespath"]} {
-         set fid [open "@initdir@/.modulespath" r]
+       if {[file readable "/usr/share/modules/init/.modulespath"]} {
+         set fid [open "/usr/share/modules/init/.modulespath" r]
          set fdata [split [read $fid] "\n"]
          close $fid
          foreach fline $fdata {
@@ -6113,8 +6113,8 @@ proc cmdModuleAutoinit {} {
 
    # source initialization modulerc if any and if no env already initialized
    if {$env(MODULEPATH) eq "" && $env(LOADEDMODULES) eq ""\
-      && [file exists "@initdir@/modulerc"]} {
-      cmdModuleSource "@initdir@/modulerc"
+      && [file exists "/usr/share/modules/init/modulerc"]} {
+      cmdModuleSource "/usr/share/modules/init/modulerc"
    }
 
    popMode