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: $xml->startTag("applications"); my @apps = @{$os->{apps}}; foreach (@apps) { $xml->startTag("application"); $xml->dataElement("name", $_->{name}); $xml->dataElement("epoch", $_->{epoch}); $xml->dataElement("version", $_->{version}); $xml->dataElement("release", $_->{release}); $xml->dataElement("arch", $_->{arch}); $xml->endTag("application"); } $xml->endTag("applications"); ...to 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*
Also storing epoch internally as '' instead of '0' is a bad idea IMO, but for sure you want to either dump: <name>blah</name> <epoch>0</epoch> <version>1</version> <release>2</release> <arch>2</arch> ...or: <name>blah</name> <version>1</version> <release>2</release> <arch>2</arch>
Created attachment 381874 [details] virt-inspector description from a CentOS 5.4 guest James, can you check if the follow patch fixes this bug? http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=a59dcdbd1b0a28c960e3792165a13f2daf4f6c35 Attached is an example of the virt-inspector XML output with this patch applied.
Looks great, thanks.
Fixed upstream.