[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: version numbers



In foo.debian-mentors, you wrote:
> James Mastros writes:
> > Package it as version 1:1.1; next time package as 1:2.0.2, which will
> > give the ordering you're looking for.  (The 1: is an "era"; it won't
> > normaly get displayed.  Made for just this sort of thing.)
> 
> It's an "epoch", I believe.  I know about epochs, but I've never seen
> anyone suggest using them without meeting with cries of outrage.  Thus I
> would like to avoid them if at all possible.
> 
> I am also just a bit astonished by the notion that 1.1 < 1.02.

Which is greater?  2.1.24 or 2.1.107

If 2.1.107 < 2.1.24, then you have an ascii sort.
If 2.1.24 < 2.1.107, then you have a numerical sort.

It seems that dpkg is doing a numerical sort, which I don't find
that unreasonable.  Consider the Linux kernal versioning (which
this example is taken from).

Digit placement, (such as that used in 1.02) should not be used in
a versioning scheme, because it places predetermined limits on the
number of revisions that can happen within a given level.
Instead, dots (.) should be used to separate revision levels, and
leading zeros within a level should be ignored within a numerical
field.

-Mitch


Reply to: