Bug 461165

Summary: Broken rpm dependecy solver
Product: Red Hat Enterprise Linux 5 Reporter: Miroslav Suchý <msuchy>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: 5.2CC: bperkins, dkovalsk, jhutar, jnovy, psklenar, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-26 06:38:57 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
List of rpm, which reproduce reported behaviour. none

Description Miroslav Suchý 2008-09-04 17:20:31 UTC
Created attachment 315783 [details]
List of rpm, which reproduce reported behaviour.

Description of problem:
During work on RHN Satellite 5.2 we hit this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=460975
Which seems to be bug in rpm itself. Basical problem is that we have three packages: ConfigPusher-general, rhns-proxy-monitoring, SatConfig-general.
rhns-proxy-monitoring requires ConfigPusher-general and SatConfig-general.
But they can not be together:

[root@dri//home/msuchy/tmp]# rpm -Uvh SatConfig-general-1.215.38-10.el5.i386.rpm
error: Failed dependencies:
        ConfigPusher-general is needed by (installed) rhns-proxy-monitoring-5.2.0-2.el5.noarch
[root@dri//home/msuchy/tmp]# rpm -q ConfigPusher-general
ConfigPusher-general-1.2.0-5.el5

Strange thing is too, when I let it install using yum, than rhns-proxy-monitoring is installed, but its dependecy SatConfig-general is not installed:
http://wwwapps.rdu.redhat.com/w3xpastebin/pastebin.php?show=7147

Version-Release number of selected component (if applicable):
Rhel5.2

How reproducible:
happend on machine owned by satellite qa
I reproduced it on machine as well. There I created minimal steps to reproduce. 

Steps to Reproduce (full without hacks):
1. register machine to rhn.webqa.redhat.com
2. install rhn-proxy 5.2 and select to install monitoring
  
Actual results:
rhns-proxy-monitoring installed, but not SatConfig-general

Expected results:
SatConfig-general should be installed

Steps to Reproduce (minimal but with little hack):
1. mkdir reproduce-rpm && cd reproduce-rpm
2. Download attached tar,
3. tar xvf reproduce-rpm.tar
4. rpm -Uvh --nodeps *.rpm
5. rpm -e SatConfig-general
6. rpm -Uvh SatConfig-general-1.215.38-10.el5.i386.rpm

Actual results:
[root@dri//home/msuchy/tmp]# rpm -Uvh SatConfig-general-1.215.38-10.el5.i386.rpm
error: Failed dependencies:
        ConfigPusher-general is needed by (installed) rhns-proxy-monitoring-5.2.0-2.el5.noarch
[root@dri//home/msuchy/tmp]# rpm -q ConfigPusher-general
ConfigPusher-general-1.2.0-5.el5

Expected results:
SatConfig-general should be installed without problem.

Additional info:
Beware that package NPusers add 2 new users to you system. So you probably do not want to run this directly on your working machine. Or you can later do deluser nocpulse and deluser nocops

Comment 1 Miroslav Suchý 2008-09-05 06:57:47 UTC
Note: same situation with packages built for RHEL4 and installing on RHEL4 is without problem.

Comment 2 Miroslav Suchý 2008-09-05 15:20:06 UTC
So we find the cause of this bug. It because ConfigPusher-general provides SatConfig-general. 

In general this bug will appear (and only on rhel5) if:

A require B and C
B provide C

if you do yum install A it correctly install A and B only. But then if I say
rpm -Uvh C 
I got the error:
error: Failed dependencies:
        B is needed by (installed) A

and it is IMO perfectly valid to have two package with the same provides (think about www-client [curl and wget]).

Lowering priority since we removed the provides and it work for us. But the bug in rpm is there.