summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/safe.tcl8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/safe.tcl b/library/safe.tcl
index 7ed6b94..deefa33 100644
--- a/library/safe.tcl
+++ b/library/safe.tcl
@@ -225,6 +225,14 @@ proc ::safe::interpConfigure {args} {
} else {
Log $slave "successful auto_reset" NOTICE
}
+ # Wherever possible, refresh package data.
+ # - Ideally [package ifneeded $pkg $ver {}] would clear the
+ # stale data from the interpreter, but instead it sets a
+ # nonsense empty script.
+ # - We cannot purge stale package data, but we can overwrite
+ # it where we have fresh data. Any remaining stale data will
+ # do no harm but the error messages may be cryptic.
+ ::interp eval $slave [list catch {package require NOEXIST}]
}
}
}