Bug 677871 - rpmdb open failed with pirut
Summary: rpmdb open failed with pirut
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: pirut
Version: 5.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-16 07:06 UTC by shunji
Modified: 2013-01-10 10:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-02 16:24:00 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description shunji 2011-02-16 07:06:10 UTC
Description of problem:

When I go Applications -> Add/Remove Software, a window come up to tell the error occurred below.

Component: pirut
Summary: TBd2ec4f0a config.py:877:_getsysver:TypeError: rpmdb open failed

Traceback (most recent call last):
  File "/usr/sbin/pirut", line 490, in ?
    main()
  File "/usr/sbin/pirut", line 483, in main
    pm = PackageManager(options.config, options.onlyrepo)
  File "/usr/sbin/pirut", line 67, in __init__
    GraphicalYumBase.__init__(self, False, config)
  File "/usr/lib/python2.4/site-packages/pirut/__init__.py", line 137, in __init__
    plugin_types=(yum.plugins.TYPE_CORE,))
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 170, in doConfigSetup
    return self.conf
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 664, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 239, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 804, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 877, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed

Local variables in innermost frame:
installroot: /
ts: <rpmUtils.transaction.TransactionWrapper instance at 0xa12ee2c>
distroverpkg: redhat-release


Version-Release number of selected component (if applicable):
pirut-1.3.28-17.el5

How reproducible:
From RHEL GUI, go Applications -> Add/Remove Software.

Steps to Reproduce:
1. From RHEL GUI, go Applications -> Add/Remove Software.
2. Wait for a while.
3. A window come up and tell the error happened.
  
Actual results:
A window come up and tell the error happened.

Expected results:
Add/Remove Software window come up.

Additional info:
No additional info.

Comment 1 James Antill 2011-02-16 15:15:04 UTC
Does this happen repeatably?

Assuming so...

If yum-updated or yum-cron running? If so can you turn it off?

Then you could run:

rm -f /var/lib/rpm/__db*
rpm --rebuilddb

...as root, which should fix it.

Comment 2 shunji 2011-03-02 07:28:07 UTC
Thank you, James.

I killed yum-updated process and did what you said, then the problem disappeared.
Sorry for the late notice.

Shunji

Comment 3 James Antill 2011-03-02 16:24:00 UTC
Ok, thanks.


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