summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-07-14 10:16:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-07-14 10:16:05 (GMT)
commit2ef9dcb65faae43f66ba1ed0dedeac2496d2b3ba (patch)
treefe9f37fe5367a6eb145aac8836fe127615235c6b
parent2ead5632823207539bb83b296fb903b63ec595ff (diff)
downloadtcl-2ef9dcb65faae43f66ba1ed0dedeac2496d2b3ba.zip
tcl-2ef9dcb65faae43f66ba1ed0dedeac2496d2b3ba.tar.gz
tcl-2ef9dcb65faae43f66ba1ed0dedeac2496d2b3ba.tar.bz2
(cherry-pick): Bugfix in library/tm.tcl - in a safe interp ::tcl::tm::UnknownHandler should always use the freshest "package ifneeded"
-rw-r--r--library/tm.tcl6
1 files changed, 5 insertions, 1 deletions
diff --git a/library/tm.tcl b/library/tm.tcl
index 1802bb9..0ed3f1a 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -238,12 +238,16 @@ proc ::tcl::tm::UnknownHandler {original name args} {
continue
}
- if {[package ifneeded $pkgname $pkgversion] ne {}} {
+ if {([package ifneeded $pkgname $pkgversion] ne {})
+ && (![interp issafe])
+ } {
# There's already a provide script registered for
# this version of this package. Since all units of
# code claiming to be the same version of the same
# package ought to be identical, just stick with
# the one we already have.
+ # This does not apply to Safe Base interpreters because
+ # the token-to-directory mapping may have changed.
continue
}