Bug 689916

Summary: rpm incorrectly process packages with the same name and version but with different architecture
Product: Red Hat Enterprise Linux 6 Reporter: Yaroslav Popovitch <yaroslav.popovitch>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED NOTABUG QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: mvadkert
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: 2012-07-05 14:16:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Yaroslav Popovitch 2011-03-22 19:22:47 UTC
Description of problem:
Rpm allows to install rpm packages with the same name and version but with different architecture. 'Rpm -q', 'rpm -qa' shows only one installed package in the system.


Version-Release number of selected component (if applicable):
rpm-4.8.0-12.el6.i686

How reproducible:
100% reproducible

Steps to Reproduce:
1. Generate two packages with the same name and version but with different architecture.
For example:
auto-1.11.1-5.i386.rpm, auto-1.11.1-5.noarch.rpm

2. Install packages to the system with 'rpm -i'
    rpm -i auto-1.11.1-5.i386.rpm
    rpm -i auto-1.11.1-5.noarch.rpm

3.1 Run rpm -q command
    rpm -q auto-1.11.1-5.i386
    rpm -q auto-1.11.1-5.noarch

3.2 Run 'rpm -qa |grep auto' command

Actual results:
3.1
    For 'rpm -q'
    # rpm -q auto-1.11.1-5.i386
    auto-1.11.1-5.i386
    # rpm -q auto-1.11.1-5.noarch
    package auto-1.11.1-5.noarch is not installed

3.2
    # rpm -qa|grep auto
shown only auto-1.11.1-5.i386 package

Expected results:
3.1
    # rpm -q auto-1.11.1-5.i386
    auto-1.11.1-5.i386
    # rpm -q auto-1.11.1-5.noarch
    auto-1.11.1-5.noarch

3.2
    shown packages:
    auto-1.11.1-5.i386
    auto-1.11.1-5.noarch

Comment 2 RHEL Program Management 2011-04-04 02:08:50 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 RHEL Program Management 2011-10-07 16:04:42 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 4 Panu Matilainen 2012-07-05 14:16:19 UTC
I'm not able to reproduce with the given steps:

[root@localhost ~]# rpm -i archtest-1.0-1.i686.rpm 
[root@localhost ~]# rpm -i archtest-1.0-1.noarch.rpm 
	package archtest-1.0-1.noarch is already installed

The message is a bit misleading but on i686, you can *not* install different archs of same package version in parallel. The closest thing I can come to reproducing this is when one tries to install both packages in the same transaction:

[root@localhost ~]# rpm -i archtest-1.0-1.i686.rpm archtest-1.0-1.noarch.rpm 
[root@localhost ~]# rpm -q archtest
archtest-1.0-1.i686
[root@localhost ~]# rpm -qa|grep archtest
archtest-1.0-1.i686
[root@localhost ~]#

The behavior becomes more obvious with -v to explain what happens:

[root@localhost ~]# rpm -iv archtest-1.0-1.i686.rpm archtest-1.0-1.noarch.rpm
warning: package archtest = 1.0-1 was already added, skipping archtest = 1.0-1
Preparing packages for installation...
archtest-1.0-1
[root@localhost ~]# 

Ie the second package of same NEVR (but different arch) is simply skipped: trying to install both does not make sense, but it can worked around so rpm doesn't make a lot of noise of it.