Artifacts Associated With Ticket 3061814fffffffff
Ticket change [bcd3ed1a8e] (rid 101821) by daapp on 2010-09-08 07:53:34:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Affected versions at least 8.6b1 and 8.5.[89] 1. Manual page tm.3 and source code file library/tm.tcl use different pattern for tcl modules - character "_" is not specified in manual page. 2. Tcl use invalid pattern for module name, which can cause problem on Windows platform. Tcl module names should follow this pattern: http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/library/tm.tcl?revision=1.18&content-type=text%2Fplain&pathrev=core-8-6-b1 set pkgpattern {^([_[:alpha:]][:_[:alnum:]]*)-([[:digit:]].*)[.]tm$} http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/library/tm.tcl?revision=1.14.2.3&view=markup&pathrev=core-8-5-9 set pkgpattern {^([_[:alpha:]][:_[:alnum:]]*)-([[:digit:]].*)[.]tm$} http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/doc/tm.n?revision=1.18&view=markup&pathrev=core-8-5.9 ([[:alpha:]][:[:alnum:]]*)-([[:digit:]].*)\e.tm http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/doc/tm.n?revision=1.18&view=markup&pathrev=core-8-6-b1 ([[:alpha:]][:[:alnum:]]*)-([[:digit:]].*)\e.tm This pattern allow to use module named a:b-1.tm, but character ":" has special meaning in Windows file names and it can't be used in names of plain files. Correct pattern for tcl modules should be: set pkgpattern {^([_[:alpha:]][_[:alnum:]]*)-([[:digit:]].*)\.tm$} - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "daapp"
- subsystem initialized to: "39. Package Manager"
- title initialized to: "Tcl use invalid pattern for module name."
- type initialized to: "Bug"
Ticket change [0d27f1d6ef] (rid 114309) by dgp on 2010-09-08 19:34:17:
- assignee changed to: "andreas_kupries"
Ticket change [9d6519e733] (rid 96298) by andreas_kupries on 2010-09-08 23:54:13:
- closedate changed to: "2010-09-08T16:54:13"
- closer changed to: "andreas_kupries"
- icomment:
allow_comments - 1 (Ad 1) The manpage is out of date needs an update ... Done. (Ad 2) This is, IMHO, not a bug. First note, from the manpage "Before the search is started ... All occurrences of “::” in the package name are replaced by the appropriate directory separator character for the platform we are on". So, a package a::b::c is transformed to a/b/c, and the search code then looks for <base>/a/b/*.tm (<base> is my placeholder here for the paths to searchs for modules). Now note that to get the package name back from a path the code converts the / back to :: ... See the code 'set pkgfilename ...' in tm.tcl. At that point we have a string like "a::b::x-X.y.tm" and this is compared against the pkgpattern. As the string contains ':' the regex has to allow this. Now if you have a package with a name like "z::a:b", using a single colon ... Then the search is for "<base>/z/*.tm" and as "a:b-1.tm" is an illegal file name on Windows it cannot be constructed and won't be found. That the pkgpattern would accept it is immaterial at this point. Windows has already prevented you from creating the file you wanted. I do not have to constrain my pattern to handle something which cannot occur. And on unix, where this such a file is possible the acceptance by the pattern is also correct.
- login: "andreas_kupries"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "andreas_kupries"