summaryrefslogtreecommitdiffstats
path: root/generic/tclPkg.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2006-12-05 15:36:12 (GMT)
committerdgp <dgp@noemail.net>2006-12-05 15:36:12 (GMT)
commite10b607c5f89bc848a259bb1ff38e61282e46fad (patch)
treedc0d31dcd5395b5b76b540c828eb341594918bd4 /generic/tclPkg.c
parent44fa8756d6f5bfbaa9bacd63620e28add37a8609 (diff)
downloadtcl-e10b607c5f89bc848a259bb1ff38e61282e46fad.zip
tcl-e10b607c5f89bc848a259bb1ff38e61282e46fad.tar.gz
tcl-e10b607c5f89bc848a259bb1ff38e61282e46fad.tar.bz2
* generic/tclPkg.c: When no requirements are supplied to a
* tests/pkg.test: [package require $pkg] and [package unknown] is invoked to find a satisfying package, pass the requirement argument "0-" (which means all versions are acceptable). This permits a registered [package unknown] command to call [package vsatisfies $testVersion {*}$args] without any special handling of the empty $args case. This fixes/avoids a bug in [::tcl::tm::UnknownHandler] that was causing old TM versions to be provided in preference to newer TM versions. Thanks to Julian Noble for discovering the issue. FossilOrigin-Name: d0d079458eda92ea703288459a6087f9757a3e1e
Diffstat (limited to 'generic/tclPkg.c')
-rw-r--r--generic/tclPkg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index cecc634..5426bc7 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPkg.c,v 1.25 2006/11/15 20:08:45 dgp Exp $
+ * RCS: @(#) $Id: tclPkg.c,v 1.26 2006/12/05 15:36:12 dgp Exp $
*
* TIP #268.
* Heavily rewritten to handle the extend version numbers, and extended
@@ -1698,6 +1698,8 @@ AddRequirementsToDString(
Tcl_DStringAppend(dsPtr, " ", 1);
Tcl_DStringAppend(dsPtr, TclGetString(reqv[i]), -1);
}
+ } else {
+ Tcl_DStringAppend(dsPtr, " 0-", -1);
}
}