From d0ee0278293706d5a2ea7328a691a74406d3b151 Mon Sep 17 00:00:00 2001 From: Robert McLay Date: Fri, 10 May 2019 11:07:22 -0500 Subject: [PATCH] Include family in spiderT, dbT, softwarePage, etc --- rt/softwarePage/err.txt | 2 +- rt/softwarePage/mf/foo/.2.0.lua | 1 + rt/softwarePage/mf/foo/1.0.lua | 1 + rt/softwarePage/mf/foo/1.1.lua | 1 + rt/softwarePage/mf/foo/1.3 | 1 + rt/softwarePage/out.txt | 11 +++++++++++ src/MC_Spider.lua | 20 +++++++++++++++++++- src/Spider.lua | 2 +- src/spider.in.lua | 1 + 9 files changed, 37 insertions(+), 3 deletions(-) diff --git a/rt/softwarePage/err.txt b/rt/softwarePage/err.txt index 4d2eabfa1..e0ee6b035 100644 --- a/rt/softwarePage/err.txt +++ b/rt/softwarePage/err.txt @@ -2,7 +2,7 @@ step 1 lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version =========================== -Modules based on Lua: Version 8.0.1 2019-04-04 19:32 -05:00 +Modules based on Lua: Version 8.1 2019-05-07 15:35 -05:00 by Robert McLay mclay@tacc.utexas.edu =========================== step 2 diff --git a/rt/softwarePage/mf/foo/.2.0.lua b/rt/softwarePage/mf/foo/.2.0.lua index 215eb3590..41b2e8a80 100644 --- a/rt/softwarePage/mf/foo/.2.0.lua +++ b/rt/softwarePage/mf/foo/.2.0.lua @@ -2,3 +2,4 @@ help([[foo v.2.0]]) whatis("Description: foo description") whatis("Version: 1.0") whatis("Categories: foo") +family("bar") diff --git a/rt/softwarePage/mf/foo/1.0.lua b/rt/softwarePage/mf/foo/1.0.lua index 00e520b5e..82512ac76 100644 --- a/rt/softwarePage/mf/foo/1.0.lua +++ b/rt/softwarePage/mf/foo/1.0.lua @@ -2,3 +2,4 @@ help([[foo v1.0]]) whatis("Description: foo description") whatis("Version: 1.0") whatis("Categories: foo") +family("bar") diff --git a/rt/softwarePage/mf/foo/1.1.lua b/rt/softwarePage/mf/foo/1.1.lua index 9e7b31967..c156b547e 100644 --- a/rt/softwarePage/mf/foo/1.1.lua +++ b/rt/softwarePage/mf/foo/1.1.lua @@ -2,3 +2,4 @@ help([[foo v1.1]]) whatis("Description: foo description") whatis("Version: 1.1") whatis("Categories: foo") +family("bar") diff --git a/rt/softwarePage/mf/foo/1.3 b/rt/softwarePage/mf/foo/1.3 index 956186efc..64a194da4 100644 --- a/rt/softwarePage/mf/foo/1.3 +++ b/rt/softwarePage/mf/foo/1.3 @@ -3,6 +3,7 @@ module-whatis "Name: foo" module-whatis "Version: 1.3" module-whatis "Category: system" module-whatis "Description: This is a descript" +family "bar" proc ModulesHelp { } { puts stderr "This is the help message for the foo 1.3 module" diff --git a/rt/softwarePage/out.txt b/rt/softwarePage/out.txt index 3eeedd56a..81a9adf7a 100644 --- a/rt/softwarePage/out.txt +++ b/rt/softwarePage/out.txt @@ -41,6 +41,7 @@ spiderT = { ["Description"] = "foo description", ["Version"] = "1.0", ["canonical"] = ".2.0", + ["family"] = "bar", ["fn"] = "ProjectDIR/rt/softwarePage/mf/foo/.2.0.lua", ["help"] = "foo v.2.0", ["luaExt"] = 5, @@ -81,6 +82,7 @@ spiderT = { ["Description"] = "foo description", ["Version"] = "1.0", ["canonical"] = "1.0", + ["family"] = "bar", ["fn"] = "ProjectDIR/rt/softwarePage/mf/foo/1.0.lua", ["help"] = "foo v1.0", ["luaExt"] = 4, @@ -95,6 +97,7 @@ spiderT = { ["Description"] = "foo description", ["Version"] = "1.1", ["canonical"] = "1.1", + ["family"] = "bar", ["fn"] = "ProjectDIR/rt/softwarePage/mf/foo/1.1.lua", ["help"] = "foo v1.1", ["luaExt"] = 4, @@ -111,6 +114,7 @@ spiderT = { ["Name"] = "foo ", ["Version"] = "1.3 ", ["canonical"] = "1.3", + ["family"] = "bar", ["fn"] = "ProjectDIR/rt/softwarePage/mf/foo/1.3", ["help"] = [[ This is the help message for the foo 1.3 module @@ -141,6 +145,7 @@ dbT = { ["ProjectDIR/rt/softwarePage/mf/foo/.2.0.lua"] = { ["Description"] = "foo description", ["Version"] = "1.0", + ["family"] = "bar", ["fullName"] = "foo/.2.0", ["help"] = "foo v.2.0", ["hidden"] = true, @@ -174,6 +179,7 @@ dbT = { ["ProjectDIR/rt/softwarePage/mf/foo/1.0.lua"] = { ["Description"] = "foo description", ["Version"] = "1.0", + ["family"] = "bar", ["fullName"] = "foo/1.0", ["help"] = "foo v1.0", ["hidden"] = false, @@ -186,6 +192,7 @@ dbT = { ["ProjectDIR/rt/softwarePage/mf/foo/1.1.lua"] = { ["Description"] = "foo description", ["Version"] = "1.1", + ["family"] = "bar", ["fullName"] = "foo/1.1", ["help"] = "foo v1.1", ["hidden"] = false, @@ -199,6 +206,7 @@ dbT = { ["Category"] = "system ", ["Description"] = "This is a descript ", ["Version"] = "1.3 ", + ["family"] = "bar", ["fullName"] = "foo/1.3", ["help"] = [[ This is the help message for the foo 1.3 module @@ -226,6 +234,7 @@ spA = { { ["canonicalVersionString"] = "000000001.000000001.*zfinal", ["description"] = "foo description", + ["family"] = "bar", ["full"] = "foo/1.1", ["help"] = "foo v1.1", ["markedDefault"] = false, @@ -236,6 +245,7 @@ spA = { { ["canonicalVersionString"] = "000000001.000000003.*zfinal", ["description"] = "This is a descript ", + ["family"] = "bar", ["full"] = "foo/1.3", ["help"] = [[ This is the help message for the foo 1.3 module @@ -249,6 +259,7 @@ And even more help { ["canonicalVersionString"] = "000000001.*zfinal", ["description"] = "foo description", + ["family"] = "bar", ["full"] = "foo/1.0", ["help"] = "foo v1.0", ["markedDefault"] = true, diff --git a/src/MC_Spider.lua b/src/MC_Spider.lua index 656a46fd4..cfca30673 100644 --- a/src/MC_Spider.lua +++ b/src/MC_Spider.lua @@ -62,7 +62,6 @@ M.conflict = MasterControl.quiet M.depends_on = MasterControl.quiet M.error = MasterControl.quiet M.execute = MasterControl.execute -M.family = MasterControl.quiet M.inherit = MasterControl.quiet M.load = MasterControl.quiet M.load_usr = MasterControl.quiet @@ -239,6 +238,25 @@ function M.is_spider(self) return true end +-------------------------------------------------------------------------- +-- Copy the family to moduleT +-- @param self A MasterControl object. +-- @param value the family value + +function M.family(self, value) + dbg.start{"MC_Spider:family(\"value=\"",value,"\")"} + local moduleStack = masterTbl().moduleStack + local iStack = #moduleStack + local path = moduleStack[iStack].path + local moduleT = moduleStack[iStack].moduleT + moduleT.family = value + dbg.fini() + return true +end + + + + -------------------------------------------------------------------------- -- Copy the property to moduleT -- @param self A MasterControl object. diff --git a/src/Spider.lua b/src/Spider.lua index 39a24ab6a..24757f98e 100644 --- a/src/Spider.lua +++ b/src/Spider.lua @@ -506,7 +506,7 @@ local function l_build_keepT(mpathA, mpathParentT, spiderT) end local dbT_keyA = { 'Description', 'Category', 'URL', 'Version', 'whatis', 'dirA', - 'pathA', 'lpathA', 'propT','help','pV','wV'} + 'family','pathA', 'lpathA', 'propT','help','pV','wV'} function M.buildDbT(self, mpathA, mpathMapT, spiderT, dbT) diff --git a/src/spider.in.lua b/src/spider.in.lua index 6471d1baa..0453acce6 100644 --- a/src/spider.in.lua +++ b/src/spider.in.lua @@ -529,6 +529,7 @@ function convertEntry(name, vv, spA) parentAA = "parent", wV = "wV", hidden = "hidden", + family = "family", propT = "properties", }