[Rpm-maint] [RFC/PATCH] comparisons without release
James Antill
james at fedoraproject.org
Tue Aug 10 16:45:24 UTC 2010
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)
Requires: foo > 1.2 (doesn't match)
Requires: foo < 1.2 (match)
Requires: foo <= 1.2 (match)
More information about the Rpm-maint
mailing list