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

>
> On Nov 20, 2009, at 10:19 PM, Per Øyvind Karlsen wrote:
>
>
> yawn, I'm really tired and about to go to bed now, so I don't feel like
> refreshing specifics of #3 as I'm too tired to understand it myself now and
> my reproducer didn't seem to reproduce any unsatisfied dependencies.. (which
> is probably also why I'm mixing rpmvercmp() with rpmdsCompare() as well;) :p
>
> but here's the behaviour of conflicts when using either old rpm 4.6.0
> behaviour or my patch:
> [r...@proyvind ~]# rpm -Uvh --test
> /home/peroyvind/RPM/RPMS/noarch/b1-1.0-1.noarch.rpm
> /home/peroyvind/RPM/RPMS/noarch/b2-1.0-1.noarch.rpm
> error: Failed dependencies:
>         foo <= 1.1 conflicts with b1-1.0-1.noarch
>         foo = 1.1 conflicts with b2-1.0-1.noarch
>
> with your patch:
> [r...@proyvind ~]# rpm -Uvh --test
> /home/peroyvind/RPM/RPMS/noarch/b1-1.0-1.noarch.rpm
> /home/peroyvind/RPM/RPMS/noarch/b2-1.0-1.noarch.rpm
> Preparing...                ###########################################
> [100%]
>
> provides/conflicts:
> [r...@proyvind ~]# rpm -qp --provides
> /home/peroyvind/RPM/RPMS/noarch/a-1.1-1.noarch.rpm
> foo = 1.1-2
> a = 1.1-1
> [r...@proyvind ~]# rpm -qp --conflicts
> /home/peroyvind/RPM/RPMS/noarch/b1-1.0-1.noarch.rpm
> foo <= 1.1
> [r...@proyvind ~]# rpm -qp --conflicts
> /home/peroyvind/RPM/RPMS/noarch/b2-1.0-1.noarch.rpm
> foo = 1.1
>
> So here you'll see for your change that 1) it changes/breaks this certain
> behavior 2) behaviour of requires & conflicts is inconsistent.
>
>
> I'm not arguing. There are no reference points, only behaviors. Whatever
> behavior you wish to see is the one you should use.
>
> You might try writing your test cases in CUDF and sending
> through a SAT solver. That process is what identified the
> Conflicts: problem in RPM originally.
>
> I'll see if I can clean up my thoughts on the requires (#3) whether the
> issue was bogus or not tomorrow, but now I'm gonna get to bed first. :)
>
>
> I think you also need to see whether the original problem with Conflicts:
> is
> still solved with your patch or not.
>
It is. :)

>
> The real issue is what @rpm.org code does and what Mandriva wants. I
> cannot answer in that area beyond diagnosing and suggesting:
> 1) fix the packages
> 2) supplying a patch
>
> I diagnosed a problem, attempted a patch, boogered that up per
>  https://qa.mandriva.com/show_bug.cgi?id=55810
> and supplied a corrected patch.
>
> Btw. does my patch look sane?
>
>
> The patch looks overly complicated because the logic uses dependency flags.
>
> Missing value definitions should not depend on type of comparison.
>
> Missing value definitions should also not depend on whether
> Conflicts: or Requires: is being compared (as I have done), but I see no
> other
> way to retrofit a fix for the problem(s) that needed to be solved.
>
> 73 de Jeff
>
Well, the change could be simplified this way, but sure, it still uses
dependency flags..
     if((B->Flags[B->i] & (~RPMSENSE_GREATER & RPMSENSE_EQUAL))
        && *bR == '\0')
    {
        aR = NULL;
        bR = NULL;
    }

Oh, btw. disregard issue #3 (requires: foo <= 1.1), it was only an issue
with the first patch I noticed, but with your patch you'll still have the
same issue with requires as was originally reported with conflicts, (ie. a
provides foo = 1.1, b requires foo < 1.1-2, a wouldn't satisfy b's
dependency) even less common scenario, but possible, and behaviour for
conflicts vs requires would also be inconsistent..

--
Regards,
Per Øyvind

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

Reply via email to