Skip to content

Commit 0d6728d

Browse files
committed
Clear extra tags when unloading module
Remove from the in-memory knowledge the extra tags set on unloading modules. These extra tags are then forgotten and will not be reapplied if module is currently reloading.
1 parent aa0f3f3 commit 0d6728d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tcl/subcmd.tcl.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,15 @@ proc cmdModuleUnload {context match auto force onlyureq onlyndep args} {
14191419
}
14201420
if {[set modtag [getExtraTagList $modname 1]] ne {}} {
14211421
remove-path __MODULES_LMEXTRATAG $modtag
1422+
# also remove extra tags from in-memory knowledge not re-apply
1423+
# them if module is reloaded in other conditions
1424+
set extratag_list [getExtraTagList $modname]
1425+
unsetModuleTag $modname {*}$extratag_list
1426+
unsetModuleExtraTag $modname {*}$extratag_list
1427+
if {$modnamevr ne {} && $modname ne $modnamevr} {
1428+
unsetModuleTag $modnamevr {*}$extratag_list
1429+
unsetModuleExtraTag $modnamevr {*}$extratag_list
1430+
}
14221431
}
14231432

14241433
if {[getConf auto_handling] && $auto} {

0 commit comments

Comments
 (0)