2009/11/20 Jeff Johnson <n3...@mac.com>

>
> On Nov 20, 2009, at 11:46 AM, Jeff Johnson wrote:
>
> > Attached is a patch that should fix
> >
> >       https://qa.mandriva.com/show_bug.cgi?id=55810
> >
> > Tested by running
> >       rpm -Va --nofiles
> > on a 2010.RC2 VM.
> >
> > WORKSFORME
> >
> > Note that this patch is for @rpm.org code. The
> > identical issue was fixed last January @rpm5.org AFAIK.
> >
> > hth
>
> Attached is a better version of the patch, that captures the
> Conflicts: behavior without changing any Requires: behavior
>
> This command was run on Mandriva 2010 RC2:
>
> [...@localhost lib]$ rpm -Va --nofiles
> Unsatisfied dependencies for acpid-2:1.0.10-1mnb2.i586:
>        suspend-scripts < 1.27-2mdv2007.1 conflicts with
> acpid-2:1.0.10-1mnb2.i586
> Unsatisfied dependencies for pm-utils-1.2.5-4mdv2010.0.i586:
>        suspend-scripts < 1.27-2mdv2007.1 conflicts with
> acpid-2:1.0.10-1mnb2.i586
> [...@localhost lib]$
>
> hth
>
> 73 de Jeff
>
> This breaks Conflicts: foo <= 1.1, Conflicts: foo  = 1.1 and Requires: foo
<= 1.1..
Hm, what about replacing:
    if (((rpmdsTagN(A) == RPMTAG_REQUIRENAME) ||
        (rpmdsTagN(B) == RPMTAG_REQUIRENAME))
     && (*aR == '\0' || *bR == '\0'))
    {
        aR = NULL;
        bR = NULL;
    }
with:
    if(((B->Flags[B->i] & (~(RPMSENSE_LESS | RPMSENSE_GREATER)) &
RPMSENSE_EQUAL)
        || ((B->Flags[B->i] & RPMSENSE_LESS) && (B->Flags[B->i] &
RPMSENSE_EQUAL)))
        && *bR == '\0')
    {
        aR = NULL;
        bR = NULL;
    }
?

Ie. this would give us consistent behaviour for both requires & conflicts,
while
also giving same behaviour with Requires: foo = 1.1 and Requires: foo <= 1.1
as earlier.

This "should" solve the issues reported and those only without changing
behaviour otherwise..(?)

WDYT?

--
Regards,
Per Øyvind

Attachment: rpm-4.6.0-rpmvercmp-handle-missing-release.patch
Description: Binary data

Reply via email to