From 3911d6c4ccf4661100a25b7a3a1495110d8ab330 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 17 Mar 2008 13:06:05 +0000 Subject: (pkgs_provider) use a temporary variable (needed for next commits) --- Rpmdrake/gui.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 1a093793..e1727245 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -520,7 +520,7 @@ sub pkgs_provider { my $h = &get_pkgs($options); # was given (1, @_) for updates ($urpm, $descriptions) = @$h{qw(urpm update_descr)}; $pkgs = $h->{all_pkgs}; - %filter_methods = ( + my %tmp_filter_methods = ( all => sub { @filtered_pkgs = keys %$pkgs }, installed => sub { @filtered_pkgs = @{$h->{installed}} }, non_installed => sub { @filtered_pkgs = @{$h->{installable}} }, @@ -536,12 +536,15 @@ sub pkgs_provider { gui_pkgs => sub { @filtered_pkgs = @{$h->{gui_pkgs}} }, ); foreach my $importance (qw(bugfix security normal)) { - $filter_methods{$importance} = sub { + $tmp_filter_methods{$importance} = sub { @filtered_pkgs = grep { my ($name) = split_fullname($_); $descriptions->{$name}{importance} eq $importance } @{$h->{updates}}; }; } + + %filter_methods = %tmp_filter_methods; + switch_pkg_list_mode($mode); } -- cgit v1.2.1