aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--Rpmdrake/gui.pm5
-rw-r--r--Rpmdrake/pkg.pm38
3 files changed, 37 insertions, 11 deletions
diff --git a/NEWS b/NEWS
index 47d6169d..fbad0520 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Version X.YY - 15 May 2014, Angelo Naselli
+
+- pkgs list contains only latest updates, not all of them, so
+ filters and backport list have been managed accordingly (fix mga#12766)
+
Version 6.10 - 22 January 2014, Colin Guthrie
- do not exec pkexec but run it so it has a parent process to fix double fork
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index 29724779..2ecdc21b 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -647,9 +647,12 @@ sub pkgs_provider {
installed => $h->{installed},
all => [ keys %$pkgs ],
);
+ #anaselli NOTE $all_pkgs contains only latest updates, not all of them.
+ # Moreover only if backports are enabled those are offered,
+ # so non needs to remove inactive_backports from all packages
my %tmp_filter_methods = (
all => sub {
- [ difference2([ keys %$pkgs ], $h->{inactive_backports}) ];
+ [ keys %$pkgs ];
},
all_updates => sub {
# potential "updates" from media not tagged as updates:
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index e9229b86..72d6bfaf 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -518,21 +518,18 @@ sub get_pkgs {
$urpm->{rpmdrake_state} = $state; #- Don't forget it
$gurpm->progress($level = 0.7);
+ #anaselli NOTE $all_pkgs contains only latest updates, not all of them
+ # but that has some issues on backports, and the old management,
+ # such as filters for instance, let's set backport first then, and
+ # only if they are enabled
my %l;
reset_pbar_count(1);
- foreach my $pkg (@{$urpm->{depslist}}) {
- update_pbar($gurpm);
- $pkg->flag_upgrade or next;
- my $key = $pkg->name . $pkg->arch;
- $l{$key} = $pkg if !$l{$key} || $l{$key}->compare($pkg);
- }
- my @installable_pkgs = map { my $n = $_->fullname; $all_pkgs{$n} = { pkg => $_ }; $n } values %l;
- undef %l;
-
my @inactive_backports;
my @active_backports;
my @backport_medias = get_backport_media($urpm);
+ my @depslist = @{$urpm->{depslist}};
+ my $removed = 0;
foreach my $medium (@backport_medias) {
update_pbar($gurpm);
@@ -549,9 +546,30 @@ sub get_pkgs {
$pkg->flag_upgrade or next;
my $name = $pkg->fullname;
push @$backports, $name;
- $all_pkgs{$name} = { pkg => $pkg, is_backport => 1 };
+ if (!$medium->{searchmedia}) {
+ # active_backports
+ my $key = $pkg->name . $pkg->arch;
+ if (!$l{$key} || ($l{$key}->fullname lt $pkg->fullname)) {
+ $l{$key} = $pkg ;
+ #anaselli letting the is_backport_flag
+ $all_pkgs{$name} = { pkg => $pkg, is_backport => 1 };
+ }
+ }
+ # removing from list so that only updates will be added later
+ splice @depslist, $pkg_id-$removed, 1;
+ $removed++;
}
}
+ foreach my $pkg (@depslist) {
+ update_pbar($gurpm);
+ $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);
+ }
+ my @installable_pkgs = map { my $n = $_->fullname; $all_pkgs{$n} = { pkg => $_ }; $n } values %l;
+ undef %l;
+
my @updates = @requested;
# selecting updates by default but skipped ones (MageiaUpdate only):
foreach (@requested_strict) {