[Rpm-maint] [RFC/PATCH] comparisons without release
James Antill
james at fedoraproject.org
Mon Nov 29 19:11:56 UTC 2010
On Mon, 2010-11-29 at 19:26 +0100, Michael Schroeder wrote:
> On Mon, Nov 29, 2010 at 01:10:25PM -0500, James Antill wrote:
> > I'm not sure what you mean by explain ... I assume you know why it's
> > doing what it's doing, so I guess you are saying "explain why we would
> > want it to do that"?
> >
> > To which I'd say, why would we want it to match on:
> >
> > Provides: foo > 1.2
> > Conflicts: foo = 1.2-1
>
> Oh, I do *not* want that to match (and my patch doesn't make it
> match).
Ok, so after your patch the following is still true:
Provides: foo > 1.2 Requires: foo = 1.2-1 -> no match.
Provides: foo >= 1.2 Requires: foo = 1.2-1 -> match.
Provides: foo >= 1.2-1 Requires: foo = 1.2-1 -> match.
Provides: foo > 1.2-0 Requires: foo = 1.2-1 -> match.
?
> I'm arguing that rpm's current behavior is confusing
> and inconsistent:
>
> Provides: foo >= 1.2-2 Requires: foo = 1.2 -> match
> Provides: foo > 1.2-1 Requires: foo = 1.2 -> no match
I'm not going to argue rpm isn't confusing or inconsistent :)
I'm just not sure we can fix all of those confusions and
inconsistencies (at least not _quickly_).
> "> 1.2-1" provides more than ">= 1.2-2", so why doesn't it match?
Because it doesn't?
For the same reason '1................' == '1.' ?:)
Because missing release comparisons have more edge cases than a big
case with lots of edges ?:).
> Uh, you're confusing me. "Provides: foo > 1.2, Requires foo = 1.2"
> does not match, both with and without the patch. But the patch
> makes "foo > 1.2-1" match "foo = 1.2".
Right, but before your patch those two things did the same thing.
> So you probably need to
> remove the yum workaround and rely on rpm doing the right thing.
Maybe, I know Panu had talked about having rangeCompare() just call
labelCompare() in "new" versions of yum and then just fixing
labelCompare() for any weird cases that break ... but I can't just
change all the released versions of yum tomorrow. So I'm more than a
little worried about doing this change.
More information about the Rpm-maint
mailing list