Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
On Fri, Aug 11, 2006 at 10:42:53AM +1000, Matthew Palmer wrote: On Thu, Aug 10, 2006 at 07:47:36PM -0400, Roberto C. Sanchez wrote: On Fri, Aug 11, 2006 at 01:29:40AM +0200, Adeodato Simó wrote: * Michael Biebl [Fri, 11 Aug 2006 01:12:59 +0200]: that dpkg --compare-versions '0.09' '=' '0.9' yields true, which I think is rather odd, 0.09 = 0.9 means: 0 == 0 and . == . and 09 == 9 Which is pretty standard math. ;-) Except that the final comparison ignores that the number was to the right of the decimal, making the zero significant. I think you will be hard pressed to find a mathematician who supports dropping significant zeros for no good reason. I'd imagine you'd be hard pressed to find a mathematician who knows what to do with a number that reads 0.0.9, either. Well, I have found one. Myself. You just have to interpret the part after the second point as the integer part of an infinitesimal: Let ε be an infinitesimal, that is a strictly positive number (that is ε 0) smaller than any strictly positive real number (that is ∀ n ∈ ℕ, n0 implies ε 1/n ). Then the version number x.y.z is interpreted as: x.y + z * ε (And a.b.c.d is interpreted as a.b + c.d * ε) Before anyone asks, yes I can go on for as many dots as you want. I just introduce a η that is strictly positive, yet strictly smaller than any ε/n for n ∈ ℕ, and I have up to five dots (six components). There are probably several ways to construct suitable ε and η and beyond, but presenting one of them is off-topic; I can present at least one of them to interested persons (Conway surreal numbers). Actually, in the Conway surreal numbers formalism, ε² would be a suitable η, but one can do better (a η that is smaller than any power of ε, yet strictly positive). One can also take the problem the other way round and use very big numbers instead of very small ones (for example the א hierarchy); the order is much less natural then, though. -- Lionel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: dak now supports ~ in version numbers
Hi, Adeodato Depends: foo (= 0.8), foo ( 0.9~) Can I assume that the first one will accept version 0.9~rc1, but the second one wont? You're right. The empty string at the end of '0.9~' counts as zero in lexical comparison. Thus 0.8 0.9~ 0.9~rc1. Cheers, Sebastian -- Sebastian tokkee Harl GnuPG-ID: 0x8501C7FC http://tokkee.org/ signature.asc Description: Digital signature
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
also sprach Michael Biebl [EMAIL PROTECTED] [2006.08.11.0012 +0100]: 1.) Wait for a 0.10 release. I think my users wouldn't be happy ;-) Why not continue to current versioning scheme until 0.10 is out to avoid the epoch? -- Please do not send copies of list mail to me; I read the list! .''`. martin f. krafft [EMAIL PROTECTED] : :' :proud Debian developer and author: http://debiansystem.info `. `'` `- Debian - when you have better things to do than fixing a system i like young girls. their stories are shorter. -- tom mcguane signature.asc Description: Digital signature (GPG/PGP)
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
On Fri, Aug 11, 2006 at 08:30:45AM +0100, martin f krafft wrote: also sprach Michael Biebl [EMAIL PROTECTED] [2006.08.11.0012 +0100]: 1.) Wait for a 0.10 release. I think my users wouldn't be happy ;-) Why not continue to current versioning scheme until 0.10 is out to avoid the epoch? Yeah -- and the improvement between 0.09+0.1.svn and 0.1~svn isn't big enough to warrant an upload anyway. The former is much nicer than 1:0.1~svn, too. -- 1KB // Microsoft corollary to Hanlon's razor: // Never attribute to stupidity what can be // adequately explained by malice. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
Michael Biebl writes (dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]): Reading this announcement I thought, great and wanted to start using '~', only to discover that dpkg believes that 0.09+0.1.svn 0.1~svn. 1.) Wait for a 0.10 release. I think my users wouldn't be happy ;-) So you think that 0.09 0.1 ? But you also think that 0.10 0.1 ? And you talk about a 0.10 upstream release, which I assume you know will come after a 0.9 upstream release. So in your universe 0.09 0.1 0.9 0.10 ? Whatever that is, it's not arithmetic :-). 2.) Use an epoch. There is no need for that; you can have ugly version numbers for a bit until 0.10 does come out. In the meantime 0.09+really+0.1~svn or whatever. Ian. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
Florian Weimer wrote: * martin f. krafft: Thanks to the work of our DPL Anthony aj Towns (and all the other people who have worked on this without my knowledge), I am happy to announce that dak, our archive management software, finally supports the use of the tilde ('~') in version numbers. Should we really start using this feature even though it violates section 5.6.12 of the Policy? It's great to see '~' support finally coming to dak, if only the announcement happened a few months earlier I would have used it in one of my packages initially. It was a 0.1 prerelease (being pretty stable though), so I called it 0.09+0.1.svn. Reading this announcement I thought, great and wanted to start using '~', only to discover that dpkg believes that 0.09+0.1.svn 0.1~svn. I have to admit that when choosing 0.09+0.1 as version number I didn't check with dpkg --compare-versions because then I would have discovered that dpkg --compare-versions '0.09' '=' '0.9' yields true, which I think is rather odd, because it means that now all version numbers up to 0.9 will be considered 0.09+0.1. So, what should I do now: 1.) Wait for a 0.10 release. I think my users wouldn't be happy ;-) 2.) Use an epoch. 3.) File a bug report against dpkg. If it's not a bug in dpkg, could someone please elaborate on the reasoning of this behaviour. I'd be grateful for any comments and replies. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
* Michael Biebl [Fri, 11 Aug 2006 01:12:59 +0200]: that dpkg --compare-versions '0.09' '=' '0.9' yields true, which I think is rather odd, because it means that now all version numbers up to 0.9 will be considered 0.09+0.1. 0.09 = 0.9 means: 0 == 0 and . == . and 09 == 9 Which is pretty standard math. ;-) If it's not a bug in dpkg, could someone please elaborate on the reasoning of this behaviour. I'd be grateful for any comments and replies. Well, don't know about the reasoning, but it's definitely not a dpkg bug, since it follows the comparison algorithm as described in Policy 5.6.12. The bottom line is: whenver dealing with version, never ever say X is obviously greater than Y, and always run dpkg --compare-versions in advance. 2.) Use an epoch. 1:0.1 is obviously (heh) 0.09. On other news, 1E0.1 is _also_ 0.9, but 1.0. (Yes, this is called abuse.) Cheers, -- Adeodato Simó dato at net.com.org.es Debian Developer adeodato at debian.org One of my most productive days was throwing away 1000 lines of code. -- Ken Thompson -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
On Fri, 11 Aug 2006 01:12:59 +0200, Michael Biebl [EMAIL PROTECTED] said: [...] If it's not a bug in dpkg, could someone please elaborate on the reasoning of this behaviour. I'd be grateful for any comments and replies. It's documented in Policy 5.6.12 [1]. Substrings composed of digits are compared numerically, and so 09 == 9. (This is done to ensure that 10 9, for example.) [1] http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version So I guess your only real option is to use an epoch. -- Hubert Chan - email Jabber: [EMAIL PROTECTED] - http://www.uhoreg.ca/ PGP/GnuPG key: 1024D/124B61FA (Key available at wwwkeys.pgp.net) Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
On Fri, Aug 11, 2006 at 01:29:40AM +0200, Adeodato Simó wrote: * Michael Biebl [Fri, 11 Aug 2006 01:12:59 +0200]: that dpkg --compare-versions '0.09' '=' '0.9' yields true, which I think is rather odd, because it means that now all version numbers up to 0.9 will be considered 0.09+0.1. 0.09 = 0.9 means: 0 == 0 and . == . and 09 == 9 Which is pretty standard math. ;-) Except that the final comparison ignores that the number was to the right of the decimal, making the zero significant. I think you will be hard pressed to find a mathematician who supports dropping significant zeros for no good reason. -Roberto -- Roberto C. Sanchez http://familiasanchez.net/~roberto signature.asc Description: Digital signature
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
On Fri, Aug 11, 2006 at 01:12:59AM +0200, Michael Biebl wrote: I have to admit that when choosing 0.09+0.1 as version number I didn't check with dpkg --compare-versions because then I would have discovered that dpkg --compare-versions '0.09' '=' '0.9' yields true, which I think is rather odd, because it means that now all version numbers up to 0.9 will be considered 0.09+0.1. So, what should I do now: 1.) Wait for a 0.10 release. I think my users wouldn't be happy ;-) 2.) Use an epoch. 3.) File a bug report against dpkg. If it's not a bug in dpkg, could someone please elaborate on the reasoning of this behaviour. I'd be grateful for any comments and replies. Oooh, oooh! I know the answer to this! fx: waves hand in the air, squirms in seat Having recently written a program to do quite detailed things with package version numbers, I've gotten intimately familiar with Policy s5.6.12. Specifically, 09 == 9 because The numerical values of these two parts are compared (3rd last paragraph), so leading zeroes are effectively stripped before comparison. I don't think it's a bug in dpkg or policy, realistically speaking -- the old practice of 0.01 versioning is pretty weird in general (periods are cheap, just make it 0.0.1 instead), and numeric sorting is much better in the general case (would you want 9 gt 10 == true?) but it just happens to have bitten you here. I think you're up for an epoch. - Matt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
* Roberto C. Sanchez [Thu, 10 Aug 2006 19:47:36 -0400]: Except that the final comparison ignores that the number was to the right of the decimal, making the zero significant. Er, read Policy 5.6.12. -- Adeodato Simó dato at net.com.org.es Debian Developer adeodato at debian.org Old men are fond of giving good advice to console themselves for their inability to set a bad example. -- La Rochefoucauld, Maxims -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
On Fri, Aug 11, 2006 at 02:21:04AM +0200, Adeodato Simó wrote: * Roberto C. Sanchez [Thu, 10 Aug 2006 19:47:36 -0400]: Except that the final comparison ignores that the number was to the right of the decimal, making the zero significant. Er, read Policy 5.6.12. I have read it. I was simply speaking from a mathematical perspective. -Roberto -- Roberto C. Sanchez http://familiasanchez.net/~roberto signature.asc Description: Digital signature
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
On Thu, Aug 10, 2006 at 07:47:36PM -0400, Roberto C. Sanchez wrote: On Fri, Aug 11, 2006 at 01:29:40AM +0200, Adeodato Simó wrote: * Michael Biebl [Fri, 11 Aug 2006 01:12:59 +0200]: that dpkg --compare-versions '0.09' '=' '0.9' yields true, which I think is rather odd, because it means that now all version numbers up to 0.9 will be considered 0.09+0.1. 0.09 = 0.9 means: 0 == 0 and . == . and 09 == 9 Which is pretty standard math. ;-) Except that the final comparison ignores that the number was to the right of the decimal, making the zero significant. I think you will be hard pressed to find a mathematician who supports dropping significant zeros for no good reason. I'd imagine you'd be hard pressed to find a mathematician who knows what to do with a number that reads 0.0.9, either. That's why we're software developers, not mathematicians. Or, to put it another way: your numbers are not our numbers. grin - Matt
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
On Thu, Aug 10, 2006 at 08:37:47PM -0400, Roberto C. Sanchez wrote: On Fri, Aug 11, 2006 at 02:21:04AM +0200, Adeodato Simó wrote: * Roberto C. Sanchez [Thu, 10 Aug 2006 19:47:36 -0400]: Except that the final comparison ignores that the number was to the right of the decimal, making the zero significant. Er, read Policy 5.6.12. I have read it. I was simply speaking from a mathematical perspective. But a mathematical perspective is wrong, because it does not tell how to interpret 1.1.1 Version numbers are not floats. -- Rodrigo Gallardo GPG-Fingerprint: 7C81 E60C 442E 8FBC D975 2F49 0199 8318 ADC9 BC28 signature.asc Description: Digital signature
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
On Fri, Aug 11, 2006 at 10:42:53AM +1000, Matthew Palmer wrote: I'd imagine you'd be hard pressed to find a mathematician who knows what to do with a number that reads 0.0.9, either. That's why we're software developers, not mathematicians. Or, to put it another way: your numbers are not our numbers. grin I never said I was a mathematician :-) The original comparison, though, was 0.09 and 0.9. -Roberto -- Roberto C. Sanchez http://familiasanchez.net/~roberto signature.asc Description: Digital signature
Re: dpkg doing wrong math (0.09 = 0.9) ?- [was: dak now supports ~ in version numbers]
On Thu, Aug 10, 2006 at 08:47:14PM -0400, Roberto C. Sanchez wrote: On Fri, Aug 11, 2006 at 10:42:53AM +1000, Matthew Palmer wrote: I'd imagine you'd be hard pressed to find a mathematician who knows what to do with a number that reads 0.0.9, either. That's why we're software developers, not mathematicians. Or, to put it another way: your numbers are not our numbers. grin I never said I was a mathematician :-) The royal 'your', though. The original comparison, though, was 0.09 and 0.9. We're out to break *all* the rules. If we need to make up a new evaluation algorithm to be able to handle 0.0.1, we may as well include handling zero-padding differently as well. - Matt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: dak now supports ~ in version numbers
Adeodato == Adeodato Simó [EMAIL PROTECTED] writes: Adeodato Package: foo-plugin Depends: foo (= 0.8), foo ( Adeodato 0.9) Adeodato Will probably want to move to: Adeodato Depends: foo (= 0.8), foo ( 0.9~) Can I assume that the first one will accept version 0.9~rc1, but the second one wont? Or I have that wrong? -- Brian May [EMAIL PROTECTED]
Re: dak now supports ~ in version numbers
* martin f. krafft: Thanks to the work of our DPL Anthony aj Towns (and all the other people who have worked on this without my knowledge), I am happy to announce that dak, our archive management software, finally supports the use of the tilde ('~') in version numbers. Should we really start using this feature even though it violates section 5.6.12 of the Policy? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: dak now supports ~ in version numbers
On Wed, 09 Aug 2006, Florian Weimer wrote: * martin f. krafft: Thanks to the work of our DPL Anthony aj Towns (and all the other people who have worked on this without my knowledge), I am happy to announce that dak, our archive management software, finally supports the use of the tilde ('~') in version numbers. Should we really start using this feature even though it violates section 5.6.12 of the Policy? Policy was written like that because the changes delineated in martin's message had yet to be implemented. It should be updated accordingly, but that by itself is no reason not to use them. Don Armstrong -- There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. -- Jeremy S. Anderson http://www.donarmstrong.com http://rzlab.ucr.edu -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: dak now supports ~ in version numbers
cc'ing debian-policy for their feedback... On Wed, Aug 09, 2006 at 12:21:10PM +0200, Florian Weimer wrote: * martin f. krafft: Thanks to the work of our DPL Anthony aj Towns (and all the other people who have worked on this without my knowledge), I am happy to announce that dak, our archive management software, finally supports the use of the tilde ('~') in version numbers. Should we really start using this feature even though it violates section 5.6.12 of the Policy? i'd say we should update the policy document. sean signature.asc Description: Digital signature
Re: dak now supports ~ in version numbers
* Don Armstrong: Should we really start using this feature even though it violates section 5.6.12 of the Policy? Policy was written like that because the changes delineated in martin's message had yet to be implemented. It should be updated accordingly, but that by itself is no reason not to use them. Nevertheless, it would have been nice to have a policy patch ready, so that those with independent implementations of the version comparison algorithm could have updated their code in time. 8-( -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: dak now supports ~ in version numbers
* martin f krafft [Wed, 09 Aug 2006 00:58:35 +0100]: ... I guess it's time to break the news that Debian now supports the ~-character as part of the version number of its packages! Thanks to all that made this possible. However, I am sure you are aware that the feature is to be considered beta, meaning that things might not always work as they should, in which case we require your patience and cooperation. Please contact [EMAIL PROTECTED] in case of problems. I uploaded bzr_0.9~rc1-1 this morning, and all when fine. dinstall still has not arrived, though. So what does all this mean? [list of things, snip] Ah, here's one more: Packages that do stuff like: Package: foo-plugin Depends: foo (= 0.8), foo ( 0.9) Will probably want to move to: Depends: foo (= 0.8), foo ( 0.9~) Cheers, -- Adeodato Simó dato at net.com.org.es Debian Developer adeodato at debian.org Listening to: Polar - Far away -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]