Mageia Bugzilla – Attachment 5166 Details for
Bug 12766
Existence of backports packages causes problems in rpmdrake
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to fix the compare package issue
compare_pkg.patch (text/plain), 1.12 KB, created by
Angelo Naselli
on 2014-05-17 21:31:14 CEST
(
hide
)
Description:
Patch to fix the compare package issue
Filename:
MIME Type:
Creator:
Angelo Naselli
Created:
2014-05-17 21:31:14 CEST
Size:
1.12 KB
patch
obsolete
>diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm >index 72d6bfa..35ad831 100644 >--- a/Rpmdrake/pkg.pm >+++ b/Rpmdrake/pkg.pm >@@ -547,9 +547,9 @@ sub get_pkgs { > my $name = $pkg->fullname; > push @$backports, $name; > if (!$medium->{searchmedia}) { >- # active_backports >+ # only active backports into all_pkgs list > my $key = $pkg->name . $pkg->arch; >- if (!$l{$key} || ($l{$key}->fullname lt $pkg->fullname)) { >+ if (!$l{$key} || ($l{$key}->compare_pkg($pkg) < 0)) { > $l{$key} = $pkg ; > #anaselli letting the is_backport_flag > $all_pkgs{$name} = { pkg => $pkg, is_backport => 1 }; >@@ -565,7 +565,7 @@ sub get_pkgs { > $pkg->flag_upgrade or next; > my $key = $pkg->name . $pkg->arch; > my $name = $pkg->fullname; >- $l{$key} = $pkg if !$l{$key} || ($l{$key}->fullname lt $pkg->fullname); >+ $l{$key} = $pkg if !$l{$key} || ($l{$key}->compare_pkg($pkg) < 0); > } > my @installable_pkgs = map { my $n = $_->fullname; $all_pkgs{$n} = { pkg => $_ }; $n } values %l; > undef %l;
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 72d6bfa..35ad831 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -547,9 +547,9 @@ sub get_pkgs { my $name = $pkg->fullname; push @$backports, $name; if (!$medium->{searchmedia}) { - # active_backports + # only active backports into all_pkgs list my $key = $pkg->name . $pkg->arch; - if (!$l{$key} || ($l{$key}->fullname lt $pkg->fullname)) { + if (!$l{$key} || ($l{$key}->compare_pkg($pkg) < 0)) { $l{$key} = $pkg ; #anaselli letting the is_backport_flag $all_pkgs{$name} = { pkg => $pkg, is_backport => 1 }; @@ -565,7 +565,7 @@ sub get_pkgs { $pkg->flag_upgrade or next; my $key = $pkg->name . $pkg->arch; my $name = $pkg->fullname; - $l{$key} = $pkg if !$l{$key} || ($l{$key}->fullname lt $pkg->fullname); + $l{$key} = $pkg if !$l{$key} || ($l{$key}->compare_pkg($pkg) < 0); } my @installable_pkgs = map { my $n = $_->fullname; $all_pkgs{$n} = { pkg => $_ }; $n } values %l; undef %l;
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12766
:
5158
|
5160
|
5161
| 5166 |
5185
|
5186
|
5187
|
5216
|
5217