Bug 559164 - Bad patch backport, uses yumdb which isn't in RHEL-5 == crash on reinstall of unavailable packages
Bad patch backport, uses yumdb which isn't in RHEL-5 == crash on reinstall of...
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: James Antill
Petr Sklenar
: Regression
Depends On:
  Show dependency treegraph
Reported: 2010-01-27 05:53 EST by Michal Nowak
Modified: 2014-01-21 01:16 EST (History)
4 users (show)

See Also:
Fixed In Version: yum-3.2.22-24.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-03-30 04:30:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Nowak 2010-01-27 05:53:22 EST
Description of problem:

[root@altix4 smoke-test]# yum clean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
[root@altix4 smoke-test]# yum reinstall coreutils.i386
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Reinstall Process
rhts-custom1                                                                             | 1.1 kB     00:00     
rhts-custom1/primary                                                                     | 6.0 kB     00:00     
rhts-custom1                                                                                              32/32
rhts-custom2                                                                             | 1.1 kB     00:00     
rhts-custom2/primary                                                                     | 7.3 kB     00:00     
rhts-custom2                                                                                              36/36
rhts-custom3                                                                             | 1.1 kB     00:00     
rhts-custom3/primary                                                                     | 816 kB     00:00     
rhts-custom3                                                                                          2292/2292
rhts-custom4                                                                             | 1.1 kB     00:00     
rhts-custom4/primary                                                                     | 8.8 kB     00:00     
rhts-custom4                                                                                              35/35
rhts-noarch                                                                              |  951 B     00:00     
rhts-noarch/primary                                                                      | 603 kB     00:00     
rhts-noarch                                                                                           3757/3757
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 178, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 349, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 1008, in doCommand
    return base.reinstallPkgs(extcmds)
  File "/usr/share/yum-cli/cli.py", line 691, in reinstallPkgs
    if 'from_repo' in ipkg.yumdb_info:
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 71, in __getattr__
    val = val[varname] # a lot we should preload at __init__.
KeyError: 'unknown header tag'

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


[ia64] coreutils-5.97-23.el5_4.1
[i386] coreutils-5.97-23.el5_4.1

How reproducible:

ia64 box w/ few i?86 packages installed from i386 repo, which is currently not available (but that does not matter, even when available via

cp /etc/yum.repos.d/rhts-custom.repo /etc/yum.repos.d/rhts-custom2.repo
sed -i -e 's/ia64/i386/g' /etc/yum.repos.d/rhts-custom2.repo

it fails too).
Comment 1 James Antill 2010-01-27 11:35:03 EST
Yep, thanks for finding this, bad backport ... the RHEL-5 yum doesn't have yumdb_info, yet.

Easy fix, just remove those three lines:

                if 'from_repo' in ipkg.yumdb_info:
                    xmsg = ipkg.yumdb_info.from_repo
                    xmsg = _(' (from %s)') % xmsg

...I did a quick grep and that's the only hit I get for yumdb.
Comment 2 James Antill 2010-01-27 13:47:33 EST
yum-3.2.22-24.el5 is building as:

Comment 3 Michal Nowak 2010-01-28 04:37:06 EST
Works fine. Tested. Thanks, James!
Comment 4 Petr Sklenar 2010-01-28 09:34:39 EST
start with verification of this bug, and start writing rhts test
Comment 9 errata-xmlrpc 2010-03-30 04:30:12 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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