*To*: debian-devel@lists.debian.org*Subject*: Re: dpkg doing wrong math (0.09 = 0.9) ?-*From*: Ben Finney <bignose+hates-spam@benfinney.id.au>*Date*: Fri, 11 Aug 2006 18:23:43 +1000*Message-id*: <[🔎] 87zmebwui8.fsf@benfinney.id.au>*References*: <20060808235835.GA19278@lapse.madduck.net> <[🔎] 87mzae1a7d.fsf@mid.deneb.enyo.de> <[🔎] 44DBBD7B.8020909@teco.edu> <[🔎] 87slk3j1fs.fsf@mid.deneb.enyo.de>

Florian Weimer <fw@deneb.enyo.de> writes: > "." is not special as far as version numbers are concerned. It's not > a separator, for instance, and "1." is a valid version number (which > is equal to "1.0"). That doesn't match my reading of Policy 5.6.12: The strings are compared from left to right. First the initial part of each string consisting entirely of non-digit characters is determined. These two parts (one of which may be empty) are compared lexically. If a difference is found it is returned. The lexical comparison is a comparison of ASCII values modified so that all the letters sort earlier than all the non-letters. Then the initial part of the remainder of each string which consists entirely of digit characters is determined. The numerical values of these two parts are compared, and any difference found is returned as the result of the comparison. For these purposes an empty string (which can only occur at the end of one or both version strings being compared) counts as zero. These two steps (comparing and removing initial non-digit strings and initial digit strings) are repeated until a difference is found or both strings are exhausted. So any '.' between digits would be a "part of [the] string consisting entirely of non-digit characters", and is compared lexically by ASCII values; following which is a "part of the remainder of [the] string which consists entirely of digit characters", and is compared numerically; and we repeat these steps until the string is exhausted. That sure sounds like a lone '.' between digit-sequences would be a separator for those digit-sequences. -- \ "Just because nobody complains doesn't mean all parachutes are | `\ perfect." -- Benny Hill | _o__) | Ben Finney

**References**:**Re: dak now supports ~ in version numbers***From:*Florian Weimer <fw@deneb.enyo.de>

**dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]***From:*Michael Biebl <biebl@teco.edu>

**Re: dpkg doing wrong math (0.09 = 0.9) ?-***From:*Florian Weimer <fw@deneb.enyo.de>

- Prev by Date:
**Re: dpkg doing wrong math (0.09 = 0.9) ?-** - Next by Date:
**Re: dpkg doing wrong math (0.09 = 0.9) ?-** - Previous by thread:
**Re: dpkg doing wrong math (0.09 = 0.9) ?-** - Next by thread:
**Re: dpkg doing wrong math (0.09 = 0.9) ?-** - Index(es):