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):
Steps to Reproduce:
``yum -d5 --nogpg install http://homepages.spa.umn.edu/~holms/selfconflict-0-1.fc14.noarch.rpm''
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)
yum and rpm agree on whether to reject or allow the transaction
The package I used for testing is here:
*** 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 == po.pkgtup and conflicting_po.pkgtup[2:] == po.pkgtup[2:]:
...and it seems to have come from this commit:
Author: Florian Festi <firstname.lastname@example.org>
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.