Bug 701456 - yum allows self-conflicting packages, while rpm does not
Summary: yum allows self-conflicting packages, while rpm does not
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 701452 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-02 21:57 UTC by Garrett Holmstrom
Modified: 2017-03-27 18:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-12 09:27:13 UTC
Type: ---


Attachments (Terms of Use)
Output of the "yum install" command given in the bug description (2.25 KB, text/plain)
2011-05-02 21:57 UTC, Garrett Holmstrom
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1370134 None CLOSED Several ipa-* packages conflict with themself 2019-03-24 20:03:31 UTC

Internal Links: 1370134

Description Garrett Holmstrom 2011-05-02 21:57:00 UTC
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

Comment 1 Garrett Holmstrom 2011-05-02 21:59:51 UTC
*** Bug 701452 has been marked as a duplicate of this bug. ***

Comment 2 James Antill 2011-05-02 22:12:40 UTC
 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@redhat.com>
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).

Comment 3 Panu Matilainen 2011-05-03 05:39:27 UTC
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

Comment 4 Panu Matilainen 2011-05-12 09:27:13 UTC
This is fixed in F15 but no immediate plans on fixing it for older releases -> closing NEXTRELEASE.


Note You need to log in before you can comment on or make changes to this bug.