Re: perl module version ordering differing from RPM

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

 



On Sat, 2002-08-31 at 21:27, Al Potter wrote:
> > John <valhalla@computerdatasafe.com.au> writes:
> > 
> > > On Friday 30 August 2002 00:41, Chip Turner wrote:
> > > > To rpm, 1.61 and 1.061 are the same.  But 1.6.1 and 1.0.6.1 are
> > > > different.
> > > 
> > > Try reporting that as a bug and see what the response is.
> > 
> > But it isn't a bug.  It's just how the algorithm works.
> 
> No.
> 
> That makes it either a documented bug, or a broken-by-design "feature".
> 
> You're posting from somewhere in Redmond, right?

No, the RPM version compare algorithm is very simple, and well
documented.  It does the best it can given that is has to handle all the
different versioning schemes used by different programs with a single
function.  It gets it "right" probably >90% of the time.

The challenge is that if you were to ask whether 1.001 and 1.1 are equal
the answer is no when comparing them as floating point numbers. 
However, 1.1 and 1.10 are the same thing if you compare as floating
point numbers, but, in many versioning schemes they are different, and
similarly 1.101 and 1.1005 are ambiguous as to how they compare.

So, no this isn't a bug, nor is it broken-by-design.  If you can come up
with an algorithm that does a better job and is as fast as the current
one, please post it.  The current one is a step above some of the other
algorithms available, but does, as you noted, have some unusual corner
cases.

Thanks.
Peter




_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@redhat.com
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux