Skip to content

Commit b9e7473

Browse files
author
Robert McLay
committed
Merging main onto IS789-hier branch
2 parents d650480 + 86e3363 commit b9e7473

File tree

12 files changed

+92
-15
lines changed

12 files changed

+92
-15
lines changed

Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ world_update:
594594
elif [ $(srcdir)/configure -ot $(srcdir)/configure.ac ]; then \
595595
echo "configure is out of date => try again"; \
596596
else \
597-
branchName=`git status | head -n 1 | sed 's/^[# ]*On branch //g'`; \
597+
branchName=`git branch --show-current` \
598598
git push github $$branchName; \
599599
git push --tags github $$branchName; \
600600
pid=$$$$; \
@@ -633,7 +633,7 @@ gittag:
633633
$(VDateFn) \
634634
$(VERSION_SRC); \
635635
git tag -a $(TAG) -m 'Setting TAG_VERSION to $(TAG)' ; \
636-
branchName=`git status | head -n 1 | sed 's/^[# ]*On branch //g'` ; \
636+
branchName=`git branch --show-current` ; \
637637
git push origin $$branchName ; \
638638
git push --tags origin $$branchName ; \
639639
fi ; \

README.new

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Lmod 8.7+
4646
* Set FPATH in bash.in so that it works correctly with both Zsh and Ksh.
4747
* Issue #594: change cp -p to cp and mv to mv -f in update_lmod_system_spider_cache.in.
4848
* Now use UID_MIN from /etc/logins.def otherwise default to UID_MIN to 500 in proj_mgmt/convert_mode.sh
49-
(8.7.13) * Transitional support for using ~/.config/lmod for collections. Currently collectionw are
49+
(8.7.13) * Issue #595: Transitional support for using ~/.config/lmod for collections. Currently collectionw are
5050
are written to both ~/.lmod.d/ and ~/.config/lmod. Site can switch to writting only to
5151
~/.config/lmod by configuring with --with-useDotConfigOnly=yes. Lmod will continue read
5252
from both directories to find a collection.
@@ -256,4 +256,5 @@ Lmod 8.7+
256256
* PR #782: updates to analyzeLmodDB
257257
W.I.P:
258258
(8.7.66) * Adding OS Name to miniConfig.
259-
259+
* Change from mysql.connector to pymysql in LmodDB.py and docs.
260+

contrib/tracking_module_usage/gen_2/LMODdb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
except:
1515
import ConfigParser as configparser
1616

17-
import mysql.connector, getpass
17+
import pymysql, getpass
1818
import warnings, inspect
1919
from BeautifulTbl import BeautifulTbl
2020
warnings.filterwarnings("ignore", "Unknown table.*")
@@ -93,7 +93,7 @@ def connect(self):
9393
self.__readFromUser()
9494

9595
try:
96-
self.__conn = mysql.connector.connect(
96+
self.__conn = pymysql.connect(
9797
host = self.__host,
9898
user = self.__user,
9999
password = self.__passwd,

contrib/tracking_module_usage/gen_2/createDB.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
sys.path.append(os.path.realpath(dirNm))
2323

2424
from LMODdb import LMODdb
25-
import mysql.connector
25+
import pymysql
2626
import argparse
2727

2828
def dbConfigFn(dbname):
@@ -103,7 +103,7 @@ def main():
103103
print("(%d) create moduleT table" % idx ); idx += 1;
104104

105105
cursor.close()
106-
except mysql.connector.Error as e:
106+
except Exception as e:
107107
print("Error %d: %s" % (e.args[0], e.args[1]))
108108
sys.exit(1)
109109

docs/source/051_tcl_modulefiles.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ standard TCL language.
157157
**remove-property NAME** *value* :
158158
See :ref:`lmodrc-label` for how to use this command.
159159

160+
**report** *string* :
161+
Prints a message to the user.
162+
160163
**reportError** *string* :
161164
Report an error and abort processing of the modulefile.
162165

docs/source/300_tracking_module_usage.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@ the second day before the log is rotated. On our machines, it seems that the lo
239239
Step 6
240240
------
241241

242-
a) Install the mysql.connector.python via pip3 or your package
243-
manager. Do NOT use mysql.connector.
242+
a) Install the pymysql via pip3 or your package manager
244243

245244
a) Create a mysql root password. Then create an account in the database like this::
246245

rt/tclmodules/err.txt

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ step 6
3333
lua ProjectDIR/src/lmod.in.lua shell --regression_testing avail
3434
===========================
3535
ProjectDIR/rt/tclmodules/mf
36-
a/1.0 help/1.0 hide/2.0 (D)
36+
a/1.0 help/1.0 hide/2.0 (D) showMe/1.0
3737
earlyLateOutput/2.0 (L) help/2.0 (D) outputMode/1.0
38-
getenv/1.0 hide/1.0 showMe/1.0
38+
getenv/1.0 hide/1.0 report/1.0
3939
Where:
4040
D: Default Module
4141
L: Module is loaded
@@ -60,6 +60,7 @@ The following is a list of the modules and extensions currently available:
6060
help: help/1.0, help/2.0
6161
hide: hide/1.0, hide/2.0
6262
outputMode: outputMode/1.0
63+
report: report/1.0
6364
showMe: showMe/1.0
6465
To learn more about a package execute:
6566
$ module spider Foo
@@ -91,3 +92,24 @@ Module Specific Help for "help/2.0"
9192
first help line
9293
with newline
9394
second help line
95+
===========================
96+
step 13
97+
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load report/1.0
98+
===========================
99+
line of text to report
100+
===========================
101+
step 14
102+
lua ProjectDIR/src/lmod.in.lua shell --regression_testing show report/1.0
103+
===========================
104+
ProjectDIR/rt/tclmodules/mf/report/1.0:
105+
LmodMessage("line of text to report")
106+
===========================
107+
step 15
108+
lua ProjectDIR/src/lmod.in.lua shell --regression_testing help report/1.0
109+
===========================
110+
Module Specific Help for "report/1.0"
111+
===========================
112+
step 16
113+
lua ProjectDIR/src/lmod.in.lua shell --regression_testing unload report/1.0
114+
===========================
115+
line of text to report

rt/tclmodules/mf/report/1.0

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#%Module
2+
report {line of text to report}

rt/tclmodules/out.txt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,43 @@ MODULEPATH=ProjectDIR/rt/tclmodules/mf;
108108
export MODULEPATH;
109109
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={earlyLateOutput={fn="ProjectDIR/rt/tclmodules/mf/earlyLateOutput/2.0",fullName="earlyLateOutput/2.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="earlyLateOutput",wV="000000002.*zfinal",},getenv={fn="ProjectDIR/rt/tclmodules/mf/getenv/1.0",fullName="getenv/1.0",loadOrder=2,propT={},stackDepth=0,status="active",userName="getenv",wV="000000001.*zfinal",},help={fn="ProjectDIR/rt/tclmodules/mf/help/1.0",fullName="help/1.0",loadOrder=3,propT={},stackDepth=0,status="active",userName="help/1.0",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/tclmodules/mf",},systemBaseMPATH="ProjectDIR/rt/tclmodules/mf",}';
110110
export _ModuleTable_;
111+
===========================
112+
step 13
113+
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load report/1.0
114+
===========================
115+
LOADEDMODULES=earlyLateOutput/2.0:getenv/1.0:help/1.0:report/1.0;
116+
export LOADEDMODULES;
117+
MODULEPATH=ProjectDIR/rt/tclmodules/mf;
118+
export MODULEPATH;
119+
_LMFILES_=ProjectDIR/rt/tclmodules/mf/earlyLateOutput/2.0:ProjectDIR/rt/tclmodules/mf/getenv/1.0:ProjectDIR/rt/tclmodules/mf/help/1.0:ProjectDIR/rt/tclmodules/mf/report/1.0;
120+
export _LMFILES_;
121+
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={earlyLateOutput={fn="ProjectDIR/rt/tclmodules/mf/earlyLateOutput/2.0",fullName="earlyLateOutput/2.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="earlyLateOutput",wV="000000002.*zfinal",},getenv={fn="ProjectDIR/rt/tclmodules/mf/getenv/1.0",fullName="getenv/1.0",loadOrder=2,propT={},stackDepth=0,status="active",userName="getenv",wV="000000001.*zfinal",},help={fn="ProjectDIR/rt/tclmodules/mf/help/1.0",fullName="help/1.0",loadOrder=3,propT={},stackDepth=0,status="active",userName="help/1.0",wV="000000001.*zfinal",},report={fn="ProjectDIR/rt/tclmodules/mf/report/1.0",fullName="report/1.0",loadOrder=4,propT={},stackDepth=0,status="active",userName="report/1.0",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/tclmodules/mf",},systemBaseMPATH="ProjectDIR/rt/tclmodules/mf",}';
122+
export _ModuleTable_;
123+
===========================
124+
step 14
125+
lua ProjectDIR/src/lmod.in.lua shell --regression_testing show report/1.0
126+
===========================
127+
MODULEPATH=ProjectDIR/rt/tclmodules/mf;
128+
export MODULEPATH;
129+
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={earlyLateOutput={fn="ProjectDIR/rt/tclmodules/mf/earlyLateOutput/2.0",fullName="earlyLateOutput/2.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="earlyLateOutput",wV="000000002.*zfinal",},getenv={fn="ProjectDIR/rt/tclmodules/mf/getenv/1.0",fullName="getenv/1.0",loadOrder=2,propT={},stackDepth=0,status="active",userName="getenv",wV="000000001.*zfinal",},help={fn="ProjectDIR/rt/tclmodules/mf/help/1.0",fullName="help/1.0",loadOrder=3,propT={},stackDepth=0,status="active",userName="help/1.0",wV="000000001.*zfinal",},report={fn="ProjectDIR/rt/tclmodules/mf/report/1.0",fullName="report/1.0",loadOrder=4,propT={},stackDepth=0,status="active",userName="report/1.0",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/tclmodules/mf",},systemBaseMPATH="ProjectDIR/rt/tclmodules/mf",}';
130+
export _ModuleTable_;
131+
===========================
132+
step 15
133+
lua ProjectDIR/src/lmod.in.lua shell --regression_testing help report/1.0
134+
===========================
135+
MODULEPATH=ProjectDIR/rt/tclmodules/mf;
136+
export MODULEPATH;
137+
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={earlyLateOutput={fn="ProjectDIR/rt/tclmodules/mf/earlyLateOutput/2.0",fullName="earlyLateOutput/2.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="earlyLateOutput",wV="000000002.*zfinal",},getenv={fn="ProjectDIR/rt/tclmodules/mf/getenv/1.0",fullName="getenv/1.0",loadOrder=2,propT={},stackDepth=0,status="active",userName="getenv",wV="000000001.*zfinal",},help={fn="ProjectDIR/rt/tclmodules/mf/help/1.0",fullName="help/1.0",loadOrder=3,propT={},stackDepth=0,status="active",userName="help/1.0",wV="000000001.*zfinal",},report={fn="ProjectDIR/rt/tclmodules/mf/report/1.0",fullName="report/1.0",loadOrder=4,propT={},stackDepth=0,status="active",userName="report/1.0",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/tclmodules/mf",},systemBaseMPATH="ProjectDIR/rt/tclmodules/mf",}';
138+
export _ModuleTable_;
139+
===========================
140+
step 16
141+
lua ProjectDIR/src/lmod.in.lua shell --regression_testing unload report/1.0
142+
===========================
143+
LOADEDMODULES=earlyLateOutput/2.0:getenv/1.0:help/1.0;
144+
export LOADEDMODULES;
145+
MODULEPATH=ProjectDIR/rt/tclmodules/mf;
146+
export MODULEPATH;
147+
_LMFILES_=ProjectDIR/rt/tclmodules/mf/earlyLateOutput/2.0:ProjectDIR/rt/tclmodules/mf/getenv/1.0:ProjectDIR/rt/tclmodules/mf/help/1.0;
148+
export _LMFILES_;
149+
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={earlyLateOutput={fn="ProjectDIR/rt/tclmodules/mf/earlyLateOutput/2.0",fullName="earlyLateOutput/2.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="earlyLateOutput",wV="000000002.*zfinal",},getenv={fn="ProjectDIR/rt/tclmodules/mf/getenv/1.0",fullName="getenv/1.0",loadOrder=2,propT={},stackDepth=0,status="active",userName="getenv",wV="000000001.*zfinal",},help={fn="ProjectDIR/rt/tclmodules/mf/help/1.0",fullName="help/1.0",loadOrder=3,propT={},stackDepth=0,status="active",userName="help/1.0",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/tclmodules/mf",},systemBaseMPATH="ProjectDIR/rt/tclmodules/mf",}';
150+
export _ModuleTable_;

rt/tclmodules/tclmodules.tdesc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ testdescript = {
3636
runLmod load help/1.0 # 10
3737
runLmod help help/1.0 # 11
3838
runLmod help help/2.0 # 12
39+
runLmod load report/1.0 # 13
40+
runLmod show report/1.0 # 14
41+
runLmod help report/1.0 # 15
42+
runLmod unload report/1.0 # 16
3943
4044
HOME=$ORIG_HOME
4145
cat _stdout.[0-9][0-9][0-9] > _stdout.orig

0 commit comments

Comments
 (0)