Subject: Re: Comparing version numbers
To: NetBSD Packages Technical Discussion List <tech-pkg@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-pkg
Date: 08/06/2002 14:33:22
[ On Monday, August 5, 2002 at 08:12:36 (+0200), Alistair Crooks wrote: ]
> Subject: Re: Comparing version numbers
>
> Ummm, we're talking about the version number that is used by the
> package, not the one which is given to it by the authors.

Hmmmm.... then what about the ones where the authors use the "rcN"
convention?  I'm thinking in particular of the early Mozilla releases?

> However, to use your example, "1.rc2" is made into an array containing:
> 
> 	1, 0, -1, 2, 0, 0, ...
> 
> and "1.rc3" is made into an array containing:
> 
> 	1, 0, -1, 3, 0, 0, ...
> 
> This means that "1.rc2" is < "1.rc3". It's also, and most critically,
> < "1.0".

Ah!  Yes, I see.  So "rc" really means insert ".0.-1.", keeping the
number after the "rc".  (though maybe it should be just ".-1."?)

That makes a lot more sense.  I was confusing the translation of "rc"
with the translation of "rcN".

> > I suggest that "rc" should mean "insert '.0.'":
> 
> Thanks for your suggestion, but I believe you've completely missed
> the point. If "rc" was encoded to ".0.", then 1.0rc1 would be
> greater than 1.0. The whole point of making "rc" negative was so
> that release candidates would sort BEFORE the release.

Yes, indeed I did.  Thanks for this much clarified explanation!

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>