Bug 1259527 - Assertion error / traceback when installing RPM that both obsoletes another RPM and listed in installonlypkgs
Assertion error / traceback when installing RPM that both obsoletes another R...
Status: NEW
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum (Show other bugs)
6.7
x86_64 Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Valentina Mukhamedzhanova
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-02 18:59 EDT by Greg Bailey
Modified: 2017-07-19 08:40 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
package-A spec file (version 1.0) (588 bytes, text/plain)
2015-09-02 19:00 EDT, Greg Bailey
no flags Details
package-B spec file (version 1.0) (539 bytes, text/plain)
2015-09-02 19:00 EDT, Greg Bailey
no flags Details
package-A spec file (version 2.0) (710 bytes, text/plain)
2015-09-02 19:01 EDT, Greg Bailey
no flags Details

  None (edit)
Description Greg Bailey 2015-09-02 18:59:06 EDT
Description of problem:

AssertionError and python traceback seem to occur when installing an RPM if all 3 of the following conditions are met:

1) The RPM being installed is listed in "installonlypkgs" in /etc/yum.conf
2) The RPM being installed obsoletes a currently installed package
3) The RPM being installed contains a %post scriptlet

I first hit this scenario while attempting to perform a "yum upgrade" to install a newer customized kernel that obsoletes "cpuspeed", which was installed.

I've reproduced this issue with test packages which I'll call "package-A" and "package-B", and /etc/yum.conf lists "package-A" in installonlypkgs.

Package-A version 1.0 is installed
Package-B version 1.0 is installed

Package-A version 2.0 obsoletes Package-B.

When attempting to yum install Package-A version 2.0, I get the traceback listed below under "Actual results:".

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

yum-3.2.29-69.el6.centos.noarch

How reproducible:

Always reproducible

Steps to Reproduce:
1.  Install package-A (version 1.0) and package-B (version 1.0)
2.  Modify /etc/yum.conf to add package-A to installonlypkgs
3.  Attempt to install package-A (version 2.0)

Actual results:

[root@localhost x86_64]# yum install package-A-2.0-1.x86_64.rpm 
Loaded plugins: fastestmirror, security
Setting up Install Process
Examining package-A-2.0-1.x86_64.rpm: package-A-2.0-1.x86_64
Marking package-A-2.0-1.x86_64.rpm as an update to package-A-1.0-1.x86_64
Loading mirror speeds from cached hostfile
 * base: mirrors.psychz.net
 * epel: linux.mirrors.es.net
 * extras: dallas.tx.mirror.xygenhosting.com
 * updates: mirror.hostduplex.com
Resolving Dependencies
--> Running transaction check
---> Package package-A.x86_64 0:2.0-1 will be obsoleting
---> Package package-A.x86_64 0:2.0-1 will be installed
---> Package package-B.x86_64 0:1.0-1 will be obsoleted
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                  Arch                  Version                 Repository                              Size
=====================================================================================================================
Installing:
 package-A                x86_64                2.0-1                   /package-A-2.0-1.x86_64                0.0  
     replacing  package-B.x86_64 1.0-1
 package-A                x86_64                2.0-1                   /package-A-2.0-1.x86_64                0.0  
     replacing  package-B.x86_64 1.0-1

Transaction Summary
=====================================================================================================================
Install       2 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : package-A-2.0-1.x86_64                                                                            1/1 
 
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 470, in callback
    self._scriptStop(bytes, total, h);
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 636, in _scriptStop
    name, txmbr = self._getTxmbr(h)
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 331, in _getTxmbr
    assert len(txmbrs) == 1
AssertionError
error: python callback <bound method RPMTransaction.callback of <yum.rpmtrans.RPMTransaction instance at 0xc14c68>> failed, aborting!
[root@localhost x86_64]# 

Expected results:

Package-B is removed

Additional info:
Comment 1 Greg Bailey 2015-09-02 19:00:09 EDT
Created attachment 1069612 [details]
package-A spec file (version 1.0)
Comment 2 Greg Bailey 2015-09-02 19:00:43 EDT
Created attachment 1069613 [details]
package-B spec file (version 1.0)
Comment 3 Greg Bailey 2015-09-02 19:01:15 EDT
Created attachment 1069614 [details]
package-A spec file (version 2.0)

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