Created attachment 496387 [details] Output of the "yum install" command given in the bug description Description of problem: When a package Provides and Conflicts with the same thing, rpm refuses to install it, but yum is perfectly fine with creating a transaction with such a package. Which tool has the correct behavior? Version-Release number of selected component (if applicable): rpm-4.8.1-5.fc14.x86_64 yum-3.2.28-5.fc14.noarch How reproducible: Always Steps to Reproduce: ``yum -d5 --nogpg install http://homepages.spa.umn.edu/~holms/selfconflict-0-1.fc14.noarch.rpm'' Actual results: Yum creates a transaction that installs the self-conflicting package and hands it to rpm, which rejects it due to the conflict. (See attached yum output) Expected results: yum and rpm agree on whether to reject or allow the transaction Additional info: The package I used for testing is here: http://homepages.spa.umn.edu/~holms/selfconflict-0-1.fc14.noarch.rpm http://homepages.spa.umn.edu/~holms/selfconflict.spec
*** Bug 701452 has been marked as a duplicate of this bug. ***
This is explicit in yum's code, where we do: (r, f, v) = conflict for conflicting_po in self.tsInfo.getProvides(r, f, v): if conflicting_po.pkgtup[0] == po.pkgtup[0] and conflicting_po.pkgtup[2:] == po.pkgtup[2:]: continue ...and it seems to have come from this commit: commit 340132409a802dbc172023c064d82d371c2d8e17 Author: Florian Festi <ffesti> Date: Fri Jul 13 12:22:50 2007 +0200 New conflict check implementation using new search API, fixes rh#245707 ...although, personally, I think it's the obviously correct behaviour (as conflicting with yourself is not useful).
rpm >= 4.9.0 allows self-conflicting packages, older versions do not (although backporting to 4.8.x remains a possibility). One potential use-case for self-conflicts is "singleton" alternatives, see http://lists.rpm.org/pipermail/rpm-maint/2010-April/002719.html
This is fixed in F15 but no immediate plans on fixing it for older releases -> closing NEXTRELEASE.