Subject: Re: Comparing version numbers
To: NetBSD Packages Technical Discussion List <tech-pkg@netbsd.org>
From: Alistair Crooks <agc@wasabisystems.com>
List: tech-pkg
Date: 08/05/2002 08:12:36
On Thu, Aug 01, 2002 at 07:15:36PM -0400, Greg A. Woods wrote:
> [ On Thursday, August 1, 2002 at 22:58:42 (+0200), Alistair Crooks wrote: ]
> > Subject: Re: Comparing version numbers
> >
> > 'rc' encodes as release candidate, which is -1
> 
> No, not just "-1".  How do you compare "1.rc2" against "1.rc3"?

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.

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".

> 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.

Regards,
Alistair