summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--library/auto.tcl18
-rw-r--r--tests/unixInit.test12
-rw-r--r--unix/tclUnixInit.c19
-rw-r--r--win/tclWinInit.c19
5 files changed, 40 insertions, 38 deletions
diff --git a/ChangeLog b/ChangeLog
index 17f331a..17f98b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-08-26 Don Porter <dgp@users.sourceforge.net>
+
+ * library/auto.tcl (tcl_findLibrary):
+ * tests/unixInit.test (unixInit-2.{1,9}):
+ * unix/tclUnixInit.c (TclpInitLibraryPath):
+ * win/tclWinInit.c (TclpInitLibraryPath): Corrected
+ inconsistency between the search path for script libraries and
+ the directory name $DISTNAME into which distributions built
+ by 'make test' unpack. [Bug 455642]
+
2001-08-24 Jeff Hobbs <jeffh@ActiveState.com>
* tests/stringComp.test: added string-1.3
diff --git a/library/auto.tcl b/library/auto.tcl
index 1281b76..2ad40eb 100644
--- a/library/auto.tcl
+++ b/library/auto.tcl
@@ -3,7 +3,7 @@
# utility procs formerly in init.tcl dealing with auto execution
# of commands and can be auto loaded themselves.
#
-# RCS: @(#) $Id: auto.tcl,v 1.7 2000/02/08 10:06:12 hobbs Exp $
+# RCS: @(#) $Id: auto.tcl,v 1.8 2001/08/27 02:14:08 dgp Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
@@ -60,7 +60,7 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
# The C application may have hardwired a path, which we honor
- if {[info exist the_library] && [string compare $the_library {}]} {
+ if {[info exists the_library] && [string compare $the_library {}]} {
lappend dirs $the_library
} else {
@@ -82,8 +82,10 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
# ../../lib/foo1.0 (From bin/arch directory in install hierarchy)
# ../library (From unix directory in build hierarchy)
# ../../library (From unix/arch directory in build hierarchy)
- # ../../foo1.0b1/library (From unix directory in parallel build hierarchy)
- # ../../../foo1.0b1/library (From unix/arch directory in parallel build hierarchy)
+ # ../../foo1.0.1/library
+ # (From unix directory in parallel build hierarchy)
+ # ../../../foo1.0.1/library
+ # (From unix/arch directory in parallel build hierarchy)
set parentDir [file dirname [file dirname [info nameofexecutable]]]
set grandParentDir [file dirname $parentDir]
@@ -91,11 +93,9 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
lappend dirs [file join $grandParentDir lib $basename$version]
lappend dirs [file join $parentDir library]
lappend dirs [file join $grandParentDir library]
- if {![regexp {.*[ab][0-9]*} $patch ver]} {
- set ver $version
- }
- lappend dirs [file join $grandParentDir $basename$ver library]
- lappend dirs [file join [file dirname $grandParentDir] $basename$ver library]
+ lappend dirs [file join $grandParentDir $basename$patch library]
+ lappend dirs [file join [file dirname $grandParentDir] \
+ $basename$patch library]
}
foreach i $dirs {
set the_library $i
diff --git a/tests/unixInit.test b/tests/unixInit.test
index 0552e50..d94ea98 100644
--- a/tests/unixInit.test
+++ b/tests/unixInit.test
@@ -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: unixInit.test,v 1.22 2001/08/24 14:59:20 dgp Exp $
+# RCS: @(#) $Id: unixInit.test,v 1.23 2001/08/27 02:14:08 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -139,11 +139,7 @@ test unixInit-2.1 {TclpInitLibraryPath: value of installLib, developLib} \
set path [getlibpath]
set installLib lib/tcl[info tclversion]
- if {[string match {*[ab]*} [info patchlevel]]} {
- set developLib tcl[info patchlevel]/library
- } else {
- set developLib tcl[info tclversion]/library
- }
+ set developLib tcl[info patchlevel]/library
set prefix [file dirname [file dirname $::tcltest::tcltest]]
set x {}
@@ -269,9 +265,7 @@ test unixInit-2.9 {TclpInitLibraryPath: paths relative to executable} {
file delete -force /tmp/library
set x
} [list /tmp/lib/tcl[info tclversion] /lib/tcl[info tclversion] \
- /tmp/library /library [format /tcl%s/library \
- [expr {[regexp {[ab]} [info patchlevel]] ?
- [info patchleve] : [info tclversion]}]]]
+ /tmp/library /library /tcl[info patchlevel]/library]
test unixInit-3.1 {TclpSetInitialEncodings} {unixOnly installedTcl} {
set env(LANG) C
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index b75acd7..0dba521 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclUnixInit.c,v 1.23 2001/07/31 19:12:08 vincentdarley Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.24 2001/08/27 02:14:08 dgp Exp $
*/
#include "tclInt.h"
@@ -214,8 +214,7 @@ CONST char *path; /* Path to the executable in native
*/
sprintf(installLib, "lib/tcl%s", TCL_VERSION);
- sprintf(developLib, "tcl%s/library",
- ((TCL_RELEASE_LEVEL < 2) ? TCL_PATCH_LEVEL : TCL_VERSION));
+ sprintf(developLib, "tcl%s/library", TCL_PATCH_LEVEL);
/*
* Look for the library relative to default encoding dir.
@@ -272,17 +271,17 @@ CONST char *path; /* Path to the executable in native
* This code looks in the following directories:
*
* <bindir>/../<installLib>
- * (e.g. /usr/local/bin/../lib/tcl8.2)
+ * (e.g. /usr/local/bin/../lib/tcl8.4)
* <bindir>/../../<installLib>
- * (e.g. /usr/local/TclPro/solaris-sparc/bin/../../lib/tcl8.2)
+ * (e.g. /usr/local/TclPro/solaris-sparc/bin/../../lib/tcl8.4)
* <bindir>/../library
- * (e.g. /usr/src/tcl8.2/unix/../library)
+ * (e.g. /usr/src/tcl8.4.0/unix/../library)
* <bindir>/../../library
- * (e.g. /usr/src/tcl8.2/unix/solaris-sparc/../../library)
+ * (e.g. /usr/src/tcl8.4.0/unix/solaris-sparc/../../library)
* <bindir>/../../<developLib>
- * (e.g. /usr/src/tcl8.2/unix/../../tcl8.2/library)
- * <bindir>/../../../<devlopLib>
- * (e.g. /usr/src/tcl8.2/unix/solaris-sparc/../../../tcl8.2/library)
+ * (e.g. /usr/src/tcl8.4.0/unix/../../tcl8.4.0/library)
+ * <bindir>/../../../<developLib>
+ * (e.g. /usr/src/tcl8.4.0/unix/solaris-sparc/../../../tcl8.4.0/library)
*/
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index a1eb02a..f90738c 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclWinInit.c,v 1.27 2001/07/31 19:12:08 vincentdarley Exp $
+ * RCS: @(#) $Id: tclWinInit.c,v 1.28 2001/08/27 02:14:08 dgp Exp $
*/
#include "tclWinInt.h"
@@ -184,8 +184,7 @@ TclpInitLibraryPath(path)
*/
sprintf(installLib, "lib/tcl%s", TCL_VERSION);
- sprintf(developLib, "../tcl%s/library",
- ((TCL_RELEASE_LEVEL < 2) ? TCL_PATCH_LEVEL : TCL_VERSION));
+ sprintf(developLib, "../tcl%s/library", TCL_PATCH_LEVEL);
/*
* Look for the library relative to default encoding dir.
@@ -221,17 +220,17 @@ TclpInitLibraryPath(path)
* This code looks in the following directories:
*
* <bindir>/../<installLib>
- * (e.g. /usr/local/bin/../lib/tcl8.2)
+ * (e.g. /usr/local/bin/../lib/tcl8.4)
* <bindir>/../../<installLib>
- * (e.g. /usr/local/TclPro/solaris-sparc/bin/../../lib/tcl8.2)
+ * (e.g. /usr/local/TclPro/solaris-sparc/bin/../../lib/tcl8.4)
* <bindir>/../library
- * (e.g. /usr/src/tcl8.2/unix/../library)
+ * (e.g. /usr/src/tcl8.4.0/unix/../library)
* <bindir>/../../library
- * (e.g. /usr/src/tcl8.2/unix/solaris-sparc/../../library)
+ * (e.g. /usr/src/tcl8.4.0/unix/solaris-sparc/../../library)
* <bindir>/../../<developLib>
- * (e.g. /usr/src/tcl8.2/unix/../../tcl8.2/library)
- * <bindir>/../../../<devlopLib>
- * (e.g. /usr/src/tcl8.2/unix/solaris-sparc/../../../tcl8.2/library)
+ * (e.g. /usr/src/tcl8.4.0/unix/../../tcl8.4.0/library)
+ * <bindir>/../../../<developLib>
+ * (e.g. /usr/src/tcl8.4.0/unix/solaris-sparc/../../../tcl8.4.0/library)
*/
/*