[Rpm-maint] RPM 4.9.0 alpha available
Panu Matilainen
pmatilai at redhat.com
Fri Nov 26 09:29:52 UTC 2010
On Thu, 25 Nov 2010, Michael Schroeder wrote:
> On Thu, Nov 25, 2010 at 12:55:17PM +0200, Panu Matilainen wrote:
> > On Thu, 25 Nov 2010, Michael Schroeder wrote:
> >
> > > On Thu, Nov 25, 2010 at 10:48:08AM +0200, Panu Matilainen wrote:
> > > > If you have time to look at the more than one tilde-case, then please do.
> > >
> > > Okey, I'll send a patch later this day.
> >
> > Cool.
>
> Patch attached. Seems to work well, but a couple of testcases
> in rpmvercmp.at would be nice.
At least these now behave as expected:
RPMVERCMP(6.0~rc1, 6.0, -1)
RPMVERCMP(6.0~rc1, 6.0~rc1, 0)
RPMVERCMP(6.0~rc1, 6.0~rc1~git123, 1)
RPMVERCMP(6.0~rc1~git123, 6.0~rc1, -1)
Maybe somebody with more experience with the tilde use (from Debian side)
could provide further/twistier example uses that can be used as
test-cases...
> Oh, I just noticed that it changes the semantics a bit:
>
> old:
> rpm.vercmp("1.", "1") -> 1
> rpm.vercmp("1..", "1.") -> 0
>
> new:
> rpm.vercmp("1.", "1") -> 0
> rpm.vercmp("1..", "1.") -> 0
>
> That's because I changed the loop from "while (*one && *two)" to
> "while (*one || *two)". The results are much saner with the change,
> but we probably need to stay bug compatible. What do you think?
That those should really return -ETYPO :) But as rpmvercmp() doesn't have
an error return I agree the new results look saner and more consistent.
I'm not aware of anything relying on the old behavior of trailing
separators either, but that doesn't necessarily mean much.
Anybody else, thoughts / commments?
- Panu -
More information about the Rpm-maint
mailing list