Attachment "libpath.patch" to
ticket [455642ffff]
added by
dgp
2001-08-27 09:10:45.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.542
diff -u -r1.542 ChangeLog
--- ChangeLog 2001/08/25 16:16:15 1.542
+++ ChangeLog 2001/08/27 01:57:20
@@ -1,3 +1,13 @@
+2001-08-26 Don Porter <[email protected]>
+
+ * 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.
+
2001-08-24 Jeff Hobbs <[email protected]>
* tests/stringComp.test: added string-1.3
Index: library/auto.tcl
===================================================================
RCS file: /cvsroot/tcl/tcl/library/auto.tcl,v
retrieving revision 1.7
diff -u -r1.7 auto.tcl
--- library/auto.tcl 2000/02/08 10:06:12 1.7
+++ library/auto.tcl 2001/08/27 01:57:29
@@ -60,7 +60,7 @@
# 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 @@
# ../../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 @@
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
Index: tests/unixInit.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/unixInit.test,v
retrieving revision 1.22
diff -u -r1.22 unixInit.test
--- tests/unixInit.test 2001/08/24 14:59:20 1.22
+++ tests/unixInit.test 2001/08/27 01:57:36
@@ -139,11 +139,7 @@
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 @@
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
Index: unix/tclUnixInit.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixInit.c,v
retrieving revision 1.23
diff -u -r1.23 tclUnixInit.c
--- unix/tclUnixInit.c 2001/07/31 19:12:08 1.23
+++ unix/tclUnixInit.c 2001/08/27 01:57:45
@@ -214,8 +214,7 @@
*/
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 @@
* 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)
*/
Index: win/tclWinInit.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinInit.c,v
retrieving revision 1.27
diff -u -r1.27 tclWinInit.c
--- win/tclWinInit.c 2001/07/31 19:12:08 1.27
+++ win/tclWinInit.c 2001/08/27 01:57:52
@@ -184,8 +184,7 @@
*/
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 @@
* 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)
*/
/*