diff options
Diffstat (limited to 'Rpmdrake')
-rw-r--r-- | Rpmdrake/gui.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index e32048cd..2b494110 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -478,6 +478,11 @@ sub switch_pkg_list_mode { $filter_methods{$mode}->(); } +sub is_updatable { + my $p = $pkgs->{$_[0]}; + $p->{pkg} && !$p->{selected} && $p->{pkg}->flag_installed && $p->{pkg}->flag_upgrade; +} + sub pkgs_provider { my ($options, $mode, %options) = @_; return if !$mode; @@ -489,7 +494,8 @@ sub pkgs_provider { installed => sub { @filtered_pkgs = @{$h->{installed}} }, non_installed => sub { @filtered_pkgs = @{$h->{installable}} }, all_updates => sub { - my @pkgs = $options{pure_updates} ? () : (grep { my $p = $pkgs->{$_}; $p->{pkg} && !$p->{selected} && $p->{pkg}->flag_installed && $p->{pkg}->flag_upgrade } @{$h->{installable}}); + my @pkgs = $options{pure_updates} ? () : + (grep { is_updatable($_) } @{$h->{installable}}); @filtered_pkgs = @{$h->{updates}}, @pkgs; }, backports => sub { @filtered_pkgs = @{$h->{backports}} }, |