On Nov 20, 2009, at 7:53 PM, Per Øyvind Karlsen wrote:
> 2009/11/20 Jeff Johnson <n3npq@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:
>
> [jbj@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
> [jbj@localhost lib]$
>
> hth
>
> 73 de Jeff
>
> This breaks Conflicts: foo <= 1.1, Conflicts: foo = 1.1 and Requires: foo <= 1.1..
Back up please.
The above Conflicts: was what was reported broken (as in not reported as a Conflict:)
My first patch broke Requires: (because I got tricked)
The "rpm -Va --nofiles" shows that no extra Requires: fail and the one (known broken) Conflicts:
is now reported correctly.
So please add details for your claim. I do not see the flaws.
> 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?
>
I've told you what I think. In order to change rpmdsCompare() _AFTER_ RC2,
one needs to do "rpm -Vavv --nofiles" with and without any patch, and diff,
to ensure that there are no unknown changes in behavior.
Anything else is called "hacking". ;-)
73 de Jeff
- application/pkcs7-signature attachment: smime.p7s
Received on Sat Nov 21 02:02:40 2009