Bug 1259527 - Assertion error / traceback when installing RPM that both obsoletes another RPM and listed in installonlypkgs
Summary: Assertion error / traceback when installing RPM that both obsoletes another R...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.7
Hardware: x86_64
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: BaseOS QE Security Team
Depends On:
TreeView+ depends on / blocked
Reported: 2015-09-02 22:59 UTC by Greg Bailey
Modified: 2020-12-11 11:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-12-06 10:40:15 UTC
Target Upstream Version:

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

Description Greg Bailey 2015-09-02 22:59:06 UTC
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):


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
 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
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 23:00:09 UTC
Created attachment 1069612 [details]
package-A spec file (version 1.0)

Comment 2 Greg Bailey 2015-09-02 23:00:43 UTC
Created attachment 1069613 [details]
package-B spec file (version 1.0)

Comment 3 Greg Bailey 2015-09-02 23:01:15 UTC
Created attachment 1069614 [details]
package-A spec file (version 2.0)

Comment 6 Jan Kurik 2017-12-06 10:40:15 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:


This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:


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