From: Richard Jones Date: Mon, 8 Mar 2010 19:24:48 +0000 (+0000) Subject: inspector: Sort application names. X-Git-Tag: 1.0.86~9 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=dcfa05f703ca0c281c12a14450d06dfb4ac7893d;hp=aca024e9766268e6a09a8aeedee562d10910ca6d inspector: Sort application names. This ensures the list of applications is stable. --- diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index e8796ad..98cdb88 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" ) {