summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-07 22:19:49 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-07 22:19:49 (GMT)
commitf089b1e4a1f26cd1580510800cf44daac9f230b9 (patch)
treea56b6f6a4b8b6550b9a7165580aa865e65931752 /library
parent493b04cbc0a18f28160f6a1abdf5f33ccdf4763a (diff)
parentbb55ca2e95ff60cced5834d4c7fd370f5fa5d9b0 (diff)
downloadtcl-f089b1e4a1f26cd1580510800cf44daac9f230b9.zip
tcl-f089b1e4a1f26cd1580510800cf44daac9f230b9.tar.gz
tcl-f089b1e4a1f26cd1580510800cf44daac9f230b9.tar.bz2
[86ceb4e2b6] Improve reaction when multiple *tm files purport to offer the
same version of the same package. Prefer the file that comes first on the tm path. Makes TCL*_TM_PATH variables more useful. Thanks to Gustaf Neumann for the suggestion. [a16752c252] Revise (partially revert) bug fix to stop crashes in buggy tclcompiler.
Diffstat (limited to 'library')
-rw-r--r--library/tm.tcl9
1 files changed, 9 insertions, 0 deletions
diff --git a/library/tm.tcl b/library/tm.tcl
index d2af4f5..55efda6 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -238,6 +238,15 @@ proc ::tcl::tm::UnknownHandler {original name args} {
continue
}
+ if {[package ifneeded $pkgname $pkgversion] ne {}} {
+ # 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.
+ continue
+ }
+
# We have found a candidate, generate a "provide script"
# for it, and remember it. Note that we are using ::list
# to do this; locally [list] means something else without