diff options
-rwxr-xr-x | inspector/virt-inspector | 3 | ||||
-rw-r--r-- | perl/lib/Sys/Guestfs/Lib.pm | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/inspector/virt-inspector b/inspector/virt-inspector index d0005101..cb892c06 100755 --- a/inspector/virt-inspector +++ b/inspector/virt-inspector @@ -519,7 +519,10 @@ sub output_xml_os foreach (@apps) { $xml->startTag("application"); $xml->dataElement("name", $_->{name}); + $xml->dataElement("epoch", $_->{epoch}) if defined $_->{epoch}; $xml->dataElement("version", $_->{version}); + $xml->dataElement("release", $_->{release}); + $xml->dataElement("arch", $_->{arch}); $xml->endTag("application"); } $xml->endTag("applications"); diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index c97fae38..49c08b39 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -1426,7 +1426,7 @@ sub _check_for_applications foreach (@lines) { if (m/^(.*) (.*) (.*) (.*) (.*)$/) { my $epoch = $2; - $epoch = "" if $epoch eq "(none)"; + undef $epoch if $epoch eq "(none)"; my $app = { name => $1, epoch => $epoch, |