[tor-bugs] #21454 [Core Tor/Tor]: tor_version_compare and version spec comparison order are inconsistent

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jul 7 14:16:27 UTC 2017


#21454: tor_version_compare and version spec comparison order are inconsistent
--------------------------+------------------------------------
 Reporter:  teor          |          Owner:  nickm
     Type:  defect        |         Status:  accepted
 Priority:  Medium        |      Milestone:  Tor: 0.3.2.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:  tor-spec      |  Actual Points:
Parent ID:                |         Points:  1
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------
Changes (by nickm):

 * owner:   => nickm
 * status:  new => accepted
 * milestone:  Tor: unspecified => Tor: 0.3.2.x-final


Comment:

 We do use "patchlevels" in current version numbers, as in "0.3.1.4-alpha":
 Major is 0, Minor is 3, Micro is 1, and patchlevel is 4.  This format is
 as described in "the new way" in version-spec.txt:
 `MAJOR.MINOR.MICRO[.PATCHLEVEL][-STATUS_TAG][ (EXTRA_INFO)]`

 Now, in tor_version_compare, we do:
 {{{
   CMP(major);
   CMP(minor);
   CMP(micro);
   CMP(status);
   CMP(patchlevel);
 }}}

 But it's the "status" field we no longer use in version numbers, not the
 "patchlevel" field.  "Status" was used for representing the "pre" or "rc"
 in 0.0.8pre5.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21454#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list