[Rpm-maint] [RFC/PATCH] comparisons without release

Michael Schroeder mls at suse.de
Tue Nov 30 09:47:32 UTC 2010


On Mon, Nov 29, 2010 at 02:11:56PM -0500, James Antill wrote:
>  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.

Yes.

> >  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 ?:).

Heh. But I think that the patch makes it much more intuitive
and consistent. Just dropping the release doesn't make much sense,
does it?

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

Actually I don't think you need to be worried. Chances are good that
the comparisons that change never happen in the real world.
Otherwise people would already have complained that rpm doesn't do
what they think it should do. ;-)

Cheers,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}


More information about the Rpm-maint mailing list