diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-04-12 20:55:47 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-04-12 21:24:03 +0200 |
commit | fb1aa950f8a70e05c123a48bcab369465037cb0f (patch) | |
tree | fec2c66d0c03eec9d82346db30ed0cef97274f01 /perl-install | |
parent | 770a49097bbc540b3546f3dab31bdaa660a59231 (diff) | |
download | drakx-fb1aa950f8a70e05c123a48bcab369465037cb0f.tar drakx-fb1aa950f8a70e05c123a48bcab369465037cb0f.tar.gz drakx-fb1aa950f8a70e05c123a48bcab369465037cb0f.tar.bz2 drakx-fb1aa950f8a70e05c123a48bcab369465037cb0f.tar.xz drakx-fb1aa950f8a70e05c123a48bcab369465037cb0f.zip |
fix upgrade when package's in several media
sort by ids (like in other places) when finding providing package, thus
fixing upgrade when the same package is offered in several media
(mga#15350)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/install/pkgs.pm | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 7a7ad0858..9ef7511d2 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,4 +1,6 @@ - add kpartx for dmraid activation +- fix upgrade when package's in several media (mga#15350) + (need URPM-5.06 too) Version 16.80 - 9 April 2015 diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm index fca5b6c19..04d281f35 100644 --- a/perl-install/install/pkgs.pm +++ b/perl-install/install/pkgs.pm @@ -126,10 +126,11 @@ sub packagesProviding { #- search package with given name and compatible with current architecture. #- take the best one found (most up-to-date). +# FIXME: reuse urpmi higher level code instead! sub packageByName { my ($packages, $name) = @_; - my @l = grep { $_->name eq $name } packagesProviding($packages, $name); + my @l = sort { $b->id <=> $a->id } grep { $_->name eq $name } packagesProviding($packages, $name); my $best; foreach (@l) { |