summaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-03-08 19:24:48 +0000
committerRichard Jones <rjones@redhat.com>2010-03-08 19:24:48 +0000
commitdcfa05f703ca0c281c12a14450d06dfb4ac7893d (patch)
tree3bb16d2f73f7bb2f3224324e8e0b74b862023a1a /perl
parentaca024e9766268e6a09a8aeedee562d10910ca6d (diff)
downloadlibguestfs-dcfa05f703ca0c281c12a14450d06dfb4ac7893d.tar.gz
libguestfs-dcfa05f703ca0c281c12a14450d06dfb4ac7893d.tar.xz
libguestfs-dcfa05f703ca0c281c12a14450d06dfb4ac7893d.zip
inspector: Sort application names.
This ensures the list of applications is stable.
Diffstat (limited to 'perl')
-rw-r--r--perl/lib/Sys/Guestfs/Lib.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm
index e8796ad3..98cdb883 100644
--- a/perl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@ -1439,6 +1439,7 @@ sub _check_for_applications
(["rpm",
"-q", "-a",
"--qf", "%{name} %{epoch} %{version} %{release} %{arch}\n"]);
+ @lines = sort @lines;
foreach (@lines) {
if (m/^(.*) (.*) (.*) (.*) (.*)$/) {
my $epoch = $2;
@@ -1458,6 +1459,7 @@ sub _check_for_applications
(["dpkg-query",
"-f", '${Package} ${Version} ${Architecture} ${Status}\n',
"-W"]);
+ @lines = sort @lines;
foreach (@lines) {
if (m/^(.*) (.*) (.*) (.*) (.*) (.*)$/) {
if ( $6 eq "installed" ) {