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