Bug 583921

Summary: virt-inspector dies without user-friendly message when RPM database in guest is corrupt
Product: [Fedora] Fedora Reporter: Marek Goldmann <mgoldman>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: mbooth, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-19 09:11:22 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Marek Goldmann 2010-04-20 04:57:01 EDT
Description of problem:

After running virt-inspector for image with broken RPM database it crashes without user friendly info.

[oddthesis@lolek-f12 vmware]$ virt-inspector jeos-centos.raw
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
command_lines: at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Sys/Guestfs/Lib.pm line 1438.

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

How reproducible:
Always with an image with bad RPM database.

Steps to Reproduce:
Actual results:

Expected results:
Message and exit or working without getting the list of packages.

Additional info:
Comment 1 Richard W.M. Jones 2010-04-20 05:18:00 EDT
This is quite an old version of libguestfs.  Does it still happen
with version 1.2.2 or 1.2.3?
Comment 2 Richard W.M. Jones 2010-05-18 10:51:52 EDT
I confirmed with Marek on IRC that this is still an issue with
recent versions of libguestfs.
Comment 3 Richard W.M. Jones 2010-05-19 09:11:22 EDT
I was unable to reproduce this with libguestfs 1.3.13.  I
deliberately corrupted the RPM database in a copy of a
guest, then ran virt-inspector against that guest.
virt-inspector ran fine, just leaving the 'Applications'
section of the output empty.

I suspect the following commit is what fixed this:

Therefore I am closing this.  Please reopen if you can reproduce
this bug with a recent version of libguestfs.