summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2013-09-07 21:36:37 (GMT)
committerdgp <dgp@noemail.net>2013-09-07 21:36:37 (GMT)
commit19735d23bdb7b3ce0c3ddf78b17aa5b177e986b3 (patch)
tree3ffb9f188177b98d4c9194e4d44a147af6c4443a /library
parentaea9c2fb09b7e9b6310d2ea5a1f1386390b86ae5 (diff)
parent31310c57ddec7b9e5bdc6ea3e79c89854dc2af8d (diff)
downloadtcl-19735d23bdb7b3ce0c3ddf78b17aa5b177e986b3.zip
tcl-19735d23bdb7b3ce0c3ddf78b17aa5b177e986b3.tar.gz
tcl-19735d23bdb7b3ce0c3ddf78b17aa5b177e986b3.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. FossilOrigin-Name: f55d92166541ec1ea50e3c705ccb0f265f692d0a
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 baa268d..7b9cafe 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -248,6 +248,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]