From 31a1f763477a80774699fc1ed49c8972f813eb64 Mon Sep 17 00:00:00 2001 From: Robert McLay Date: Fri, 13 Dec 2024 11:59:18 -0700 Subject: [PATCH] updated the new Lmod docs for gen 2 --- docs/source/025_new.rst | 10 +++++++++- src/utils.lua | 5 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/source/025_new.rst b/docs/source/025_new.rst index b5ef82762..9d209a1a9 100644 --- a/docs/source/025_new.rst +++ b/docs/source/025_new.rst @@ -1,13 +1,21 @@ New Features in Lmod ==================== +**Updated Tracking Module Usage** + (Lmod 8.7.54+) The optional module usage tracking system has been + updated. It now uses Python3 and mysql.connector.python. The new + system also greatly reduces the amount of data stored. See the + updated documentation at :ref:`tracking_usage` and how to convert + from old gen 1 format to the new gen 2 database format at + :ref:`convert_gen1_gen2-label` + + **LMOD_SHOW_HIDDEN** (Lmod 8.7.54+) The environment variable **LMOD_SHOW_HIDDEN** can be used to control whether hidden modules will be show under list, spider, avail. See :ref:`show_hidden-label` for more details - **Accessing isVisible status from load hook** (Lmod 8.7.52+) The mname object is passed to the load hook. Sites can access the isVisible status by t.mname:isVisible() diff --git a/src/utils.lua b/src/utils.lua index f97598bb1..b9ccfbc6c 100644 --- a/src/utils.lua +++ b/src/utils.lua @@ -418,9 +418,8 @@ function readAdmin() for v in whole:split("\n") do repeat - v = v:gsub("%s+$","") - - if (v:gsub("^%s+", ""):sub(1,1) == "#") then + v = v:gsub("%s+","") + if (v:sub(1,1) == "#") then -- ignore this comment line break