aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--NEWS2
-rw-r--r--URPM/Resolve.pm4
2 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 39a394f..87031fc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- fix upgrade when package's in several media (mga#15350)
+
Version 5.05 - 26 February 2015
- fix a segfault when callbacks don't get a header
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 {