From dcfa05f703ca0c281c12a14450d06dfb4ac7893d Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 8 Mar 2010 19:24:48 +0000 Subject: [PATCH 1/1] inspector: Sort application names. This ensures the list of applications is stable. --- perl/lib/Sys/Guestfs/Lib.pm | 2 ++ 1 file changed, 2 insertions(+) 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" ) { -- 1.8.3.1