[Rpm-maint] [RFC/PATCH] comparisons without release
Anssi Hannula
anssi at mandriva.org
Tue Aug 10 17:19:04 UTC 2010
James Antill kirjoitti tiistai, 10. elokuuta 2010 19:45:24:
> On Tue, 2010-08-10 at 19:23 +0300, Anssi Hannula wrote:
> > > > One solution that may seem obvious at first is making the comparison
> > > > ignore releases only if neither has one. However, it would break a
> > > > situation where A: Provides: foo = 1.2-5
> > > > B: Requires: foo = 1.2
> > > >
> > > > So, in this "requires/conflicts/etc has RPMSENSE_EQUAL on
> > > > non-released EVR"
> > >
> > > You can't change the semantics just for '=' operations, or you get
> > >
> > > insanity like:
> > >
> > > Requires: foo = 1.2 (matches)
> > > Requires: foo >= 1.2 (doesn't match)
> >
> > That was not the case, '>=' is AFAIK (RPMSENSE_EQUAL | RPMSENSE_GREATER)
> > and thus has RPMSENSE_EQUAL, getting the same behaviour.
>
> Ok, I misread your intent, but that just changes the insanity. Given
> the code:
>
> + /* "= 1.0" and similar have to match 1.0-1 */
> + if((B->Flags[B->i] & (RPMSENSE_EQUAL | RPMSENSE_GREATER)) && *bR ==
> '\0') {
> + aR = NULL;
> + bR = NULL;
> + }
> +
>
> ...you get:
>
> Provides: foo = 1.2-0.1
> Requires: foo >= 1.2 (match)
As before.
> Requires: foo > 1.2 (doesn't match)
As before.
> Requires: foo < 1.2 (match)
How is 1.2-0.1 < 1.2 true?
AFAICS this is "no match", as before.
> Requires: foo <= 1.2 (match)
As before.
--
Anssi Hannula
More information about the Rpm-maint
mailing list