Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1097560

Summary: repoquery tracebacks when fails to open rpmdb
Product: Red Hat Enterprise Linux 6 Reporter: Karel Srot <ksrot>
Component: yum-utilsAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: low Docs Contact:
Priority: medium    
Version: 6.5CC: ksrot, vmukhame
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-utils-1.1.30-26.el6 Doc Type: Bug Fix
Doc Text:
Cause: run repoquery when rpmdb fails to open Consequence: repoquery crashes Fix: patch Result: no crash
Story Points: ---
Clone Of: 1050218 Environment:
Last Closed: 2014-10-14 04:38:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to test none

Description Karel Srot 2014-05-14 05:52:35 UTC
Description of problem:

This is a RHEL-6 clone of the bug 1050218.

repoquery tracebacks when fails to open rpmdb.

Version-Release number of selected component (if applicable):
yum-utils-1.1.30-17.el6_5

How reproducible:
always

Steps to Reproduce:
1. mkdir -p /tmp/var/lib/rpm
2. touch /tmp/var/lib/rpm/__db.001
3. echo -e '[main]\ninstallroot=/tmp' > /tmp/yum.conf
4. repoquery -c /tmp/yum.conf --installed -a

Actual results:
traceback

Expected results:
no traceback

Additional info:

Comment 1 Valentina Mukhamedzhanova 2014-05-14 08:06:25 UTC
Hi Karel, could you please clarify in which sense is this bug a clone of bug 1050218? The traceback I'm getting here ("yum.Errors.YumBaseError: Error: rpmdb open failed") is different than the one in that bug ("NameError: global name 'YumBaseError' is not defined").

I will attach the patch that handles this traceback for me, please let me know if it fixes the reported problem.

Comment 2 Valentina Mukhamedzhanova 2014-05-14 08:07:43 UTC
Created attachment 895398 [details]
patch to test

Comment 3 Valentina Mukhamedzhanova 2014-05-14 08:24:42 UTC
*** Bug 1097570 has been marked as a duplicate of this bug. ***

Comment 4 Karel Srot 2014-05-14 08:38:17 UTC
You are right, I discovered the traceback when preparing a reproducer for bug 1050218 and I didn't encounter that these two tracebacks are different. And yes, the patch fixed in for me.

Comment 8 errata-xmlrpc 2014-10-14 04:38:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1411.html