aboutsummaryrefslogtreecommitdiffstats
path: root/URPM/Resolve.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-04-12 02:39:09 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-04-12 22:01:48 +0200
commitffb2d910aa08ff5feb4337454af10ecc03bfd0c3 (patch)
tree3ae646ab405d49b99ef93e721eeb281adc999919 /URPM/Resolve.pm
parentb7ec7d3936795147d4b997ed40ee0af799b449b8 (diff)
downloadperl-URPM-ffb2d910aa08ff5feb4337454af10ecc03bfd0c3.tar
perl-URPM-ffb2d910aa08ff5feb4337454af10ecc03bfd0c3.tar.gz
perl-URPM-ffb2d910aa08ff5feb4337454af10ecc03bfd0c3.tar.bz2
perl-URPM-ffb2d910aa08ff5feb4337454af10ecc03bfd0c3.tar.xz
perl-URPM-ffb2d910aa08ff5feb4337454af10ecc03bfd0c3.zip
fix upgrade when package's in several media
sort by ids (like in other places) when promoting (b/c of eg: conflicts), thus fixing upgrade when the same package is offered in several media (mga#15350) see commit 53e38beae4d9638f41b219521b802a2969d68909 for similar issue
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r--URPM/Resolve.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 2f580ae..641e006 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -1507,7 +1507,7 @@ sub _handle_diff_provides {
}
if (@packages) {
- my $best = join('|', map { $_->id } @packages);
+ my $best = join('|', sort { $a <=> $b } map { $_->id } @packages);
$urpm->{debug_URPM}("promoting " . join(' ', _ids_to_fullnames($urpm, split('\|', $best))) . " because of conflict above") if $urpm->{debug_URPM};
push @$properties, { required => $best, promote => $n, psel => $pkg };
} else {
@@ -1564,7 +1564,7 @@ sub _handle_conflict {
}
if (@packages) {
- my $best = join('|', map { $_->id } @packages);
+ my $best = join('|', sort { $a <=> $b } map { $_->id } @packages);
$urpm->{debug_URPM}("promoting " . join('|', map { scalar $_->fullname } @packages) . " because of conflict above") if $urpm->{debug_URPM};
unshift @$properties, { required => $best, promote_conflicts => $reason };
} else {