diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-06-18 20:05:44 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-10-03 23:17:06 +0200 |
commit | ec6cb173cc28f500e01f5acf8c8eb3e88c7adff0 (patch) | |
tree | f29e70be95351beb64bc54d2eee3ff30b620259f /URPM/Resolve.pm | |
parent | 1756bd8b8bc477a5791cbe8c5ddf19176ed8adf5 (diff) | |
download | perl-URPM-ec6cb173cc28f500e01f5acf8c8eb3e88c7adff0.tar perl-URPM-ec6cb173cc28f500e01f5acf8c8eb3e88c7adff0.tar.gz perl-URPM-ec6cb173cc28f500e01f5acf8c8eb3e88c7adff0.tar.bz2 perl-URPM-ec6cb173cc28f500e01f5acf8c8eb3e88c7adff0.tar.xz perl-URPM-ec6cb173cc28f500e01f5acf8c8eb3e88c7adff0.zip |
adapt to perl-5.18 random hash keys ordering
thus fixing urpmi testsuite...
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r-- | URPM/Resolve.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 896fe50..4ad9e7c 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -81,7 +81,7 @@ sub find_candidate_packages { push @packages, $pkg; } elsif (my $name = property2name($_)) { my $property = $_; - foreach (keys %{$urpm->{provides}{$name} || {}}) { + foreach (sort keys %{$urpm->{provides}{$name} || {}}) { my $pkg = $urpm->{depslist}[$_]; $pkg->flag_skip and next; $pkg->is_arch_compat or next; @@ -231,7 +231,7 @@ sub find_required_package { } } } - my @packages = values %packages; + my @packages = sort { $a->fullname cmp $b->fullname } values %packages; if (@packages > 1) { #- packages should be preferred if one of their provides is referenced @@ -266,7 +266,8 @@ sub _find_required_package__sort { my ($best, @other) = sort { $a->[1] <=> $b->[1] #- we want the lowest (ie preferred arch) - || $b->[2] <=> $a->[2]; #- and the higher score + || $b->[2] <=> $a->[2] #- and the higher score + || $a->[0]->fullname cmp $b->[0]->fullname; #- then by name } map { my $score = 0; $score += 2 if $_->flag_requested; |