Artifacts Associated With Ticket 218564
Ticket change [38bd99a39c] (rid 112261) by nobody on 2000-10-26 01:02:21:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1138 RFE Version: 8.0.4 SubmitDate: '1999-02-02' LastModified: '1999-02-02' Severity: SER Status: Released Submitter: welch ChangedBy: stanton OS: Windows 95 OSVersion: 95/98/NT4.0 and Linux (Redhat 4.2) Machine: X86 FixedDate: '1999-02-02' FixedInVersion: 8.0.5 ClosedDate: '2000-10-25' Name: Jan Nijtmans DesiredBehavior: Here are a few small changes to init.tcl, which enhance the robustness of the Tcl initialization in various practical situations. These enhancements come from the plus-patches, but are general enough to be suitable for the core. - If the variable $tcl_library contains the empty string, this empty string will be put in $auto_path. This is not useful at all, it only slows down later package processing. - If the variable tcl_pkgPath is not set, the "unset __dir" fails. Thich makes init.tcl totally unusable. Better put a "catch" around it. - In the function tcl_findLibraries, the "string match" function only works correctly if $tcl_patchLevel is in one of the forms "?.?a?", "?.?b?" or "?.?.?". Could a "regexp" be used instead, then it allows anything to be appended to the patchLevel string. And it is more efficient. - The tclPkgSetup function assumes that if $type != "load" then the type must be "source". This needn't be true. Some users (me, for example) want to add their own setup types. Patch: *** library/init.tcl.origThu Nov 12 06:54:02 1998 --- library/init.tclSat Jan 30 08:59:53 1999 *************** *** 41,51 **** --- 41,53 ---- set auto_path "" } } + if {[string compare [info library] {}]} { foreach __dir [list [info library] [file dirname [info library]]] { if {[lsearch -exact $auto_path $__dir] < 0} { lappend auto_path $__dir } } + } if {[info exist tcl_pkgPath]} { foreach __dir $tcl_pkgPath { if {[lsearch -exact $auto_path $__dir] < 0} { *************** *** 53,59 **** } } } ! unset __dir # Windows specific initialization to handle case isses with envars --- 55,61 ---- } } } ! catch {unset __dir} # Windows specific initialization to handle case isses with envars *************** *** 610,616 **** # The C application may have hardwired a path, which we honor ! if {[info exist the_library]} { lappend dirs $the_library } else { --- 612,618 ---- # The C application may have hardwired a path, which we honor ! if {[info exist the_library] && [string compare $the_library {}]} { lappend dirs $the_library } else { *************** *** 640,648 **** lappend dirs [file join $grandParentDir lib $basename$version] lappend dirs [file join $parentDir library] lappend dirs [file join $grandParentDir library] ! if {[string match {*[ab]*} $patch]} { ! set ver $patch ! } else { set ver $version } lappend dirs [file join $grandParentDir $basename$ver library] --- 642,648 ---- 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] *************** *** 1424,1430 **** if {$type == "load"} { set auto_index($cmd) [list load [file join $dir $f] $pkg] } else { ! set auto_index($cmd) [list source [file join $dir $f]] } } } --- 1424,1430 ---- if {$type == "load"} { set auto_index($cmd) [list load [file join $dir $f] $pkg] } else { ! set auto_index($cmd) [list $type [file join $dir $f]] } } } PatchFiles: init.tcl - foundin initialized to: "obsolete: 8.0.4"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "Robustness of init.tcl"
- type initialized to: "Bug"
Ticket change [53144969b4] (rid 126421) by welch on 2000-10-26 08:24:15:
- closedate changed to: "2000-10-26T01:24:15"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [54f549b9a8] (rid 94039) by dgp on 2001-04-16 23:20:10:
- closedate changed to: "2001-04-16T16:20:10"
- closer changed to: "dgp"
- subsystem changed to: "38. Init - Library - Autoload"