Bug 110317

Summary: Conflicts: not honored in rpm
Product: [Fedora] Fedora Reporter: Peter Backlund <peter.backlund>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: herrold
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-11-22 19:42:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
spec file that generates two, empty rpms. none

Description Peter Backlund 2003-11-18 13:01:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031022

Description of problem:
rpm will let me install a package with conflicts, accoring to the
following schema:

- Package Foo has Conflicts: Bar in spec file, and shows "Bar" when
doing rpm -q --conflicts

- Package Bar has no explicit conflicts.

1. Install Foo.
2. Install Bar.

The expected behaviour would be that rpm bails out, says "package Bar
conflicts with (already installed) Foo". Instead, it quitely installs Bar.

If you do the other way around, that is first install Bar, and then
try to install Foo (the one with the explicit conflict), rpm does bail
out as expected.

Seth Vidal has two small pseudo-packages triggering this case, which I
hope he'll upload here. It is my understanding that A conflicts with B
if and only if B conflicts with A. Is that true?

Version-Release number of selected component (if applicable):
rpm-4.2.1-0.30

How reproducible:
Always

Comment 1 Seth Vidal 2003-11-18 13:42:47 UTC
See attached

Comment 2 Seth Vidal 2003-11-18 13:43:29 UTC
Created attachment 96039 [details]
spec file that generates two, empty rpms.

Comment 3 Jeff Johnson 2003-11-22 16:34:41 UTC
...
Wrote: /X/test-noarch/test-noarch-0-0.src.rpm
Wrote: /X/test-noarch/test-noarch-0-0.noarch.rpm
Wrote: /X/test-noarch/test-noarch-anti-0-0.noarch.rpm
Executing(%clean): /bin/sh -e /X/tmp/rpm-tmp.57438
+ umask 022
+ cd /X/test-noarch
+ exit 0
$ sudo xrpm -Uvh *h.rpm
error: Failed dependencies:
        test-noarch conflicts with test-noarch-anti-0-0
===========================================================
$ sudo rpm -Uvh test-noarch-0-0.noarch.rpm
Preparing...               
########################################### [100%]
   1:test-noarch           
########################################### [100%]
$ sudo rpm -Uvh test-noarch-anti-0-0.noarch.rpm
error: Failed dependencies:
        test-noarch conflicts with test-noarch-anti-0-0
===========================================================
$ sudo rpm -Uvh test-noarch-anti-0-0.noarch.rpm
Preparing...               
########################################### [100%]
   1:test-noarch-anti      
########################################### [100%]
$ sudo rpm -Uvh test-noarch-0-0.noarch.rpm
Preparing...               
########################################### [100%]
   1:test-noarch           
########################################### [100%]
===================================================

Yup.





Comment 4 Seth Vidal 2003-11-22 17:10:01 UTC
the 'yup' means 'confirmed' right?


Comment 5 Jeff Johnson 2003-11-22 19:42:39 UTC
Fixed in CVS on rpm-4_2 branch.