Mageia Bugzilla – Attachment 10243 Details for
Bug 23037
installer and mga5->mga6 upgrade failures after Grand Update (URPM incorrectly selects obsolete lib64kf5ksieveui_5 package; subsequent dependencies cause many KDE package conflicts)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
fix finding better pkg (mga#23037)
0001-fix-finding-better-pkg-mga-23037.patch (text/plain), 1.56 KB, created by
Thierry Vignaud
on 2018-06-14 00:21:06 CEST
(
hide
)
Description:
fix finding better pkg (mga#23037)
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2018-06-14 00:21:06 CEST
Size:
1.56 KB
patch
obsolete
>From 3ab0f02ec1b5bc55fd320df7982622387f3a42c2 Mon Sep 17 00:00:00 2001 >From: Thierry Vignaud <thierry.vignaud@gmail.com> >Date: Thu, 14 Jun 2018 00:11:50 +0200 >Subject: [PATCH] fix finding better pkg (mga#23037) > >alter commit ef5c24cccff5f374232276b3064813aba88ee888 so that sorting >pkgs got a better one in first place, by: >- comparing EVRs before name >- comparing EVRs rather than synthesis ids >--- > NEWS | 1 + > URPM/Resolve.pm | 3 ++- > 2 files changed, 3 insertions(+), 1 deletion(-) > >diff --git a/NEWS b/NEWS >index 1c9fa02..7b807da 100644 >--- a/NEWS >+++ b/NEWS >@@ -1,3 +1,4 @@ >+- fix finding better pkg (mga#23037) > - make logs more reproductible > > Version 5.16 - 10 February 2018 >diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm >index 2a0b1c4..7b3b1e3 100644 >--- a/URPM/Resolve.pm >+++ b/URPM/Resolve.pm >@@ -336,6 +336,7 @@ 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->[0]->compare_pkg($a->[0]) #- then by EVR (for upgrade) > || $a->[0]->fullname cmp $b->[0]->fullname; #- then by name > } map { > my $score = 0; >@@ -359,7 +360,7 @@ sub _find_required_package__sort { > if ($urpm->{media}) { > @chosen_with_score = sort { > $a->[2] != $b->[2] ? >- $a->[0]->id <=> $b->[0]->id : >+ $b->[0]->compare_pkg($a->[0]) : > $b->[1] <=> $a->[1] || $b->[0]->compare_pkg($a->[0]); > } map { [ $_, _score_for_locales($urpm, $db, $_), pkg2media($urpm->{media}, $_) ] } @chosen; > } else { >-- >2.17.1 >
From 3ab0f02ec1b5bc55fd320df7982622387f3a42c2 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud <thierry.vignaud@gmail.com> Date: Thu, 14 Jun 2018 00:11:50 +0200 Subject: [PATCH] fix finding better pkg (mga#23037) alter commit ef5c24cccff5f374232276b3064813aba88ee888 so that sorting pkgs got a better one in first place, by: - comparing EVRs before name - comparing EVRs rather than synthesis ids --- NEWS | 1 + URPM/Resolve.pm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 1c9fa02..7b807da 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- fix finding better pkg (mga#23037) - make logs more reproductible Version 5.16 - 10 February 2018 diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 2a0b1c4..7b3b1e3 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -336,6 +336,7 @@ 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->[0]->compare_pkg($a->[0]) #- then by EVR (for upgrade) || $a->[0]->fullname cmp $b->[0]->fullname; #- then by name } map { my $score = 0; @@ -359,7 +360,7 @@ sub _find_required_package__sort { if ($urpm->{media}) { @chosen_with_score = sort { $a->[2] != $b->[2] ? - $a->[0]->id <=> $b->[0]->id : + $b->[0]->compare_pkg($a->[0]) : $b->[1] <=> $a->[1] || $b->[0]->compare_pkg($a->[0]); } map { [ $_, _score_for_locales($urpm, $db, $_), pkg2media($urpm->{media}, $_) ] } @chosen; } else { -- 2.17.1
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 23037
:
10154
|
10155
|
10164
|
10166
|
10189
|
10190
|
10218
|
10221
|
10237
|
10239
|
10240
| 10243 |
10244
|
10246