Skip to content

Commit

Permalink
Include family in spiderT, dbT, softwarePage, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed May 10, 2019
1 parent 0542719 commit d0ee027
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rt/softwarePage/err.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]
===========================
step 2
Expand Down
1 change: 1 addition & 0 deletions rt/softwarePage/mf/foo/.2.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ help([[foo v.2.0]])
whatis("Description: foo description")
whatis("Version: 1.0")
whatis("Categories: foo")
family("bar")
1 change: 1 addition & 0 deletions rt/softwarePage/mf/foo/1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ help([[foo v1.0]])
whatis("Description: foo description")
whatis("Version: 1.0")
whatis("Categories: foo")
family("bar")
1 change: 1 addition & 0 deletions rt/softwarePage/mf/foo/1.1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ help([[foo v1.1]])
whatis("Description: foo description")
whatis("Version: 1.1")
whatis("Categories: foo")
family("bar")
1 change: 1 addition & 0 deletions rt/softwarePage/mf/foo/1.3
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 11 additions & 0 deletions rt/softwarePage/out.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -226,6 +234,7 @@ spA = {
{
["canonicalVersionString"] = "000000001.000000001.*zfinal",
["description"] = "foo description",
["family"] = "bar",
["full"] = "foo/1.1",
["help"] = "foo v1.1",
["markedDefault"] = false,
Expand All @@ -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
Expand All @@ -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,
Expand Down
20 changes: 19 additions & 1 deletion src/MC_Spider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/Spider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/spider.in.lua
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ function convertEntry(name, vv, spA)
parentAA = "parent",
wV = "wV",
hidden = "hidden",
family = "family",
propT = "properties",
}

Expand Down

0 comments on commit d0ee027

Please sign in to comment.