@@ -1460,11 +1460,13 @@ proc getLoadedMatchingName {name {behavior {}} {loading 0} {lmlist {}}\
14601460 if {$loading } {
14611461 set isModulefileLoaded isModulefileLoading
14621462 set getModuleFromLoadedModulefile getModuleFromLoadingModulefile
1463+ set isLoadedMatchSpecificPath isLoadingMatchSpecificPath
14631464 set getLoadedModuleList [list getLoadingModuleList]
14641465 } else {
14651466 # #nagelfar ignore #4 Found constant
14661467 set isModulefileLoaded isModulefileLoaded
14671468 set getModuleFromLoadedModulefile getModuleFromLoadedModulefile
1469+ set isLoadedMatchSpecificPath isLoadedMatchSpecificPath
14681470 set getLoadedModuleList [list getEnvLoadedModulePropertyParsedList name]
14691471 }
14701472
@@ -1510,7 +1512,7 @@ proc getLoadedMatchingName {name {behavior {}} {loading 0} {lmlist {}}\
15101512 set matchmod $mod
15111513 }
15121514 # test module matches specified modulepaths
1513- if {![isLoadedMatchSpecificPath $mod $modulepath_list $loading ]} {
1515+ if {![$ isLoadedMatchSpecificPath $mod $modulepath_list ]} {
15141516 continue
15151517 }
15161518 if {[modEq $name $matchmod eqstart 1 [expr {$loading ? 1 : 2}] 1]} {
@@ -1537,14 +1539,14 @@ proc getLoadedMatchingName {name {behavior {}} {loading 0} {lmlist {}}\
15371539 return $ret
15381540}
15391541
1540- # return if loaded (or loading) module is part of modulepath from specified
1541- # constrained list
1542- proc isLoadedMatchSpecificPath {mod modulepath_list loading} {
1543- if { $loading } {
1544- set mod_file [getModulefileFromLoadingModule $mod ]
1545- } else {
1546- set mod_file [getModulefileFromLoadedModule $mod ]
1547- }
1542+ # return if loaded mod is part of modulepath from specified constrained list
1543+ proc isLoadedMatchSpecificPath {mod modulepath_list} {
1544+ set mod_file [getModulefileFromLoadedModule $mod ]
1545+ return [isModulefileMatchSpecificPath $mod_file $modulepath_list ]
1546+ }
1547+
1548+ proc isLoadingMatchSpecificPath {mod modulepath_list} {
1549+ set mod_file [getModulefileFromLoadingModule $mod ]
15481550 return [isModulefileMatchSpecificPath $mod_file $modulepath_list ]
15491551}
15501552
@@ -1668,7 +1670,7 @@ proc getModuleLoadedConflict {mod {modulepath_list {}}} {
16681670 }
16691671
16701672 if {[isOtherVariantOfModuleLoaded $mod ] || ([isModuleLoaded $mod ] &&\
1671- ![isLoadedMatchSpecificPath $mod $modulepath_list 0 ])} {
1673+ ![isLoadedMatchSpecificPath $mod $modulepath_list ])} {
16721674 lappend mod_con_list [getModuleNameAndVersFromVersSpec $mod ]
16731675 }
16741676
@@ -2062,7 +2064,7 @@ proc setModuleDependency {mod} {
20622064 foreach modpre $prereq {
20632065 set lmfound {}
20642066 foreach lmmod $modlist {
2065- if {[isLoadedMatchSpecificPath $lmmod $prereq_path_list 0 ] &&\
2067+ if {[isLoadedMatchSpecificPath $lmmod $prereq_path_list ] &&\
20662068 [modEq $modpre $lmmod eqstart 1 2 1]} {
20672069 set lmfound $lmmod
20682070 break
@@ -2082,7 +2084,7 @@ proc setModuleDependency {mod} {
20822084
20832085 # look if requirement can be found in the No Particular Order list
20842086 foreach lmmod $modnpolist {
2085- if {[isLoadedMatchSpecificPath $lmmod $prereq_path_list 0 ] &&\
2087+ if {[isLoadedMatchSpecificPath $lmmod $prereq_path_list ] &&\
20862088 [modEq $modpre $lmmod eqstart 1 2 1]} {
20872089 appendNoDupToList lmnpolist $lmmod
20882090 break
@@ -2145,7 +2147,7 @@ proc setModuleDependency {mod} {
21452147 if {[modEq $modpre $mod eqstart 1 2 1]} {
21462148 reportDebug " refresh requirements targeting '$modpre '"
21472149 foreach {lmmod prereq_path_list} $::g_unmetDepHash($modpre) {
2148- if {![isLoadedMatchSpecificPath $mod $prereq_path_list 0 ]} {
2150+ if {![isLoadedMatchSpecificPath $mod $prereq_path_list ]} {
21492151 continue
21502152 }
21512153 if {$mod in [getDependentLoadedModuleList [list $lmmod ] 0 0]} {
0 commit comments