RPM Community Forums

Mailing List Message of <rpm-users>

Re: Conflicts vs Obsoletes

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 16 Nov 2009 - 02:44:32 CET
Message-id: <84B46D64-0CCE-46CF-BD35-ABBBCB2BD291@mac.com>

On Nov 15, 2009, at 7:31 PM, Marc MERLIN wrote:

>
> Yes, I can build dummy packages to try all this, but at the same  
> time I want
> to make sure I understand expected (not observed) behaviour as well  
> as well
> as what is recommended in case like this.
>

You likely want to build packages and test for careful work.

There's actually a Conflicts: bug that goes way way way back to  
rpm-3.0.2
with missing values that was reported about a month ago.

These 2 values in different packages should Conflict: and don't:

	Conflicts: suspend-scripts < 1.27-2mdv2007.1

and

	Provides: suspend-scripts = 1.27

The issue is with the missing value for Release: in the Provides:
and the comparison behavior isn't correct for Conlficts:.

Your examples did not supply {Epoch,Version,Release} at all, and so  
may well
have odd/unexpected behavior.

I can point you at the line that needs to be changed if you want to fix
the issue. The code looks something like this:

    if (sense == 0) {
        sense = rpmvercmp(aV, bV);
        if (sense == 0 && aR && *aR && bR && *bR)
            sense = rpmvercmp(aR, bR);
    }

and the "... aR && *aR && bR && *bR" is what is b0rken. The fix
is to default missing values to "" and actually call rpmvercmp()
with "" values.

I can send a patch for rpm-4.0.2 if interested. Just too lazy to look  
atm ...

hth

73 de Jeff

  • application/pkcs7-signature attachment: smime.p7s
Received on Mon Nov 16 02:45:27 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.