History Of Ticket 00bc6a8fb5e894a7480d154af8e14ea8d269560a
  1. Ticket change [dc1581b36e] (rid 463) by anonymous on 2015-04-13 02:54:10:

    1. Change foundin to "trunk"
    2. Change icomment to:

      teapot-client uses [lsort -dictionary] to determine the newest package version, which is incorrect (case in point: tdbc).

      The following patch fixes this AND inclides a workaround for vectcl http://teapot.rkeene.org/entity/name/vectcl/index.html which doesn't conform to [package vcompare]. The latter should surely be fixed: ActiveState's teapot knows it only as "0.1".

      Index: client/lib/teapotclient0.1/teapotclient.tcl ================================================================== --- client/lib/teapotclient0.1/teapotclient.tcl +++ client/lib/teapotclient0.1/teapotclient.tcl @@ -340,17 +340,29 @@

      lappend pkginfo($pkg) [list $ver $arch] }
      foreach pkg [array names pkginfo] { - set pkginfo($pkg) [lsort -decreasing -dictionary $pkginfo($pkg)] + set pkginfo($pkg) [lsort -decreasing -command ::teapotclient::vcompare $pkginfo($pkg)] }
      return [array get pkginfo] }
      proc setcachedir {dir} { set ::teapotclient::pkgcachedir $dir } + + proc vcompare {a b} { + try { + package vcompare $a $b + } on error {} { + try { + package vcompare [lindex $a 0] [lindex $b 0] + } on error {} { + string compare -nocase $a $b + } + } + } }

      package provide teapotclient 0.1

      Index: client/teapot-client.tcl ================================================================== --- client/teapot-client.tcl +++ client/teapot-client.tcl @@ -88,15 +88,15 @@ set extinfoitemvers [lindex $extinfoitem 0] if {[lsearch -exact $extvers $extinfoitemvers] == -1} { lappend extvers $extinfoitemvers } } - set extvers [lsort -decreasing -dictionary $extvers] + set extvers [lsort -decreasing -command ::teapotclient::vcompare $extvers]

      puts " $ext [lindex $extvers 0]" } } default { print_help exit 1 } }
    3. Change login to "anonymous"
    4. Change mimetype to "text/x-fossil-plain"
    5. Change private_contact to "cb02a4a25e8da92f2790bc307bf01ef24ce6053e"
    6. Change severity to "Severe"
    7. Change status to "Open"
    8. Change title to:

      use [package vcompare] instead of dictionary sort for package versions

    9. Change type to "Code_Defect"