summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2020-07-13 12:09:47 (GMT)
committerkjnash <k.j.nash@usa.net>2020-07-13 12:09:47 (GMT)
commit9c9af976ae17ba173df40300467589554956e8f2 (patch)
treef9315e6446edd434cb2cb89a8197369e5fc536a7 /library
parentc256107a5c50a4ffa13d226f245f25cf4ccc311f (diff)
downloadtcl-9c9af976ae17ba173df40300467589554956e8f2.zip
tcl-9c9af976ae17ba173df40300467589554956e8f2.tar.gz
tcl-9c9af976ae17ba173df40300467589554956e8f2.tar.bz2
Bugfix in library/safe.tcl - when auto_reset, also reload pkgIndex.tcl data; pass tests safe-9.10, safe-9.11
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}]
}
}
}