This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 552718 - virt-inspector has non-standard/non-complete format for applications
virt-inspector has non-standard/non-complete format for applications
Product: Fedora
Classification: Fedora
Component: libguestfs (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-01-05 17:45 EST by James Antill
Modified: 2010-01-06 04:43 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-01-06 04:43:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
virt-inspector description from a CentOS 5.4 guest (401.46 KB, application/xml)
2010-01-05 18:10 EST, Richard W.M. Jones
no flags Details

  None (edit)
Description James Antill 2010-01-05 17:45:19 EST
Description of problem:
 For the applications part of the virt-inspector dump, you print data like (from example2.xml):

1770       <application>
1771         <name>libguestfs</name>
1772         <version>1.0.68</version>
1773       </application>

...but this isn't enough information to specify which package of libguestfs you have. You need at least something like:

    my @apps =  @{$os->{apps}};
    foreach (@apps) {
        $xml->dataElement("name", $_->{name});
        $xml->dataElement("epoch", $_->{epoch});
        $xml->dataElement("version", $_->{version});
        $xml->dataElement("release", $_->{release});
        $xml->dataElement("arch", $_->{arch});
    $xml->endTag("applications"); be 100% you also want the checksums (and the yum version for the system would be nice), but you have a slight problem there in that you'd need to get it in _check_for_applications() first.
 Also: *cough* Calling rpm -qa --qf and using regexps to get the package list *cough*
Comment 1 James Antill 2010-01-05 17:48:51 EST
Also storing epoch internally as '' instead of '0' is a bad idea IMO, but for sure you want to either dump:



Comment 2 Richard W.M. Jones 2010-01-05 18:10:12 EST
Created attachment 381874 [details]
virt-inspector description from a CentOS 5.4 guest

James, can you check if the follow patch fixes this bug?;a=commitdiff;h=a59dcdbd1b0a28c960e3792165a13f2daf4f6c35

Attached is an example of the virt-inspector XML output with
this patch applied.
Comment 3 James Antill 2010-01-05 18:55:12 EST
Looks great, thanks.
Comment 4 Richard W.M. Jones 2010-01-06 04:43:51 EST
Fixed upstream.

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