[environment-modules] Fix createmodule.sh to handle exported functions (bug #1197321)

Orion Poplawski orion at fedoraproject.org
Mon Mar 2 16:01:54 UTC 2015


commit bdf13c6db7cdad32e43252e836b977dbb4af2640
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Mon Mar 2 09:01:51 2015 -0700

    Fix createmodule.sh to handle exported functions (bug #1197321)

 createmodule.sh          | 7 +++++--
 environment-modules.spec | 5 ++++-
 2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/createmodule.sh b/createmodule.sh
index 5a37b3e..f0b3b32 100755
--- a/createmodule.sh
+++ b/createmodule.sh
@@ -48,8 +48,11 @@ printenvarray () {
   env | while read x
   do
     key=${x%%=*}
-    value=${x#*=}
-    echo [$key]="'$value'"
+    value=`printenv "$key"`
+    if [ $? -eq 0 ]
+    then
+      echo [$key]="'$value'"
+    fi
   done
 }
 
diff --git a/environment-modules.spec b/environment-modules.spec
index 63d92dd..15057c5 100644
--- a/environment-modules.spec
+++ b/environment-modules.spec
@@ -2,7 +2,7 @@
 
 Name:           environment-modules
 Version:        3.2.10
-Release:        13%{?dist}
+Release:        14%{?dist}
 Summary:        Provides dynamic modification of a user's environment
 
 Group:          System Environment/Base
@@ -140,6 +140,9 @@ fi
 
 
 %changelog
+* Mon Mar 2 2015 Orion Poplwski <orion at cora.nwra.com> - 3.2.10-14
+- Fix createmodule.sh to handle exported functions (bug #1197321)
+
 * Wed Jan 28 2015 Orion Poplwski <orion at cora.nwra.com> - 3.2.10-13
 - Add patch for python 3 support, use python3 for createmodule.py on F22
 


More information about the scm-commits mailing list