diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-06-27 09:17:53 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-06-27 19:08:19 +0200 |
commit | 41cbd29d520393bc1940217472c403ea4310732e (patch) | |
tree | 907832ce08b8d99c1b0e2d17dce3932ff916f370 /Rpmdrake/pkg.pm | |
parent | 5788627a0a6bdb2961534c9c2a99014e6f60a99f (diff) | |
download | rpmdrake-41cbd29d520393bc1940217472c403ea4310732e.tar rpmdrake-41cbd29d520393bc1940217472c403ea4310732e.tar.gz rpmdrake-41cbd29d520393bc1940217472c403ea4310732e.tar.bz2 rpmdrake-41cbd29d520393bc1940217472c403ea4310732e.tar.xz rpmdrake-41cbd29d520393bc1940217472c403ea4310732e.zip |
Revert "package list contains only latest updates, not all, so"
This reverts commit 5b24d6f61e17bffc2c9283a65100a29d6a05e586.
Conflicts:
NEWS
rationale:
too much changes & replacing compare*() by lt is bogus for comparing rpm
versions
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rw-r--r-- | Rpmdrake/pkg.pm | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 72d6bfaf..e9229b86 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -518,18 +518,21 @@ 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); @@ -546,30 +549,9 @@ sub get_pkgs { $pkg->flag_upgrade or next; my $name = $pkg->fullname; push @$backports, $name; - 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++; + $all_pkgs{$name} = { pkg => $pkg, is_backport => 1 }; } } - 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) { |