Mageia Bugzilla – Attachment 6241 Details for
Bug 15350
Upgrade failed mga4 to mga5 when adding online media to DVD - 195 transactions failed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
more complete fix
15350.diff (text/plain), 1.40 KB, created by
Thierry Vignaud
on 2015-04-12 02:56:15 CEST
(
hide
)
Description:
more complete fix
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2015-04-12 02:56:15 CEST
Size:
1.40 KB
patch
obsolete
>commit fef90acb69f70200bb5e8ed173b445d27859cba2 >Author: Thierry Vignaud <thierry.vignaud@gmail.com> >Date: Sun Apr 12 02:39:09 2015 +0200 > > 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 > >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 {
commit fef90acb69f70200bb5e8ed173b445d27859cba2 Author: Thierry Vignaud <thierry.vignaud@gmail.com> Date: Sun Apr 12 02:39:09 2015 +0200 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 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 {
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15350
:
5943
|
6020
|
6030
|
6056
|
6072
|
6073
|
6074
|
6129
|
6130
|
6158
|
6174
|
6212
|
6213
|
6239
|
6240
| 6241 |
6242