From be011ee5b35311d6b17afb19467c18911ac5279c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 16 Mar 2013 09:10:25 +0000 Subject: perl_checker cleanups --- Rpmdrake/pkg.pm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index fca2483d..7442f43c 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -367,7 +367,7 @@ sub get_installed_packages { urpm::select::add_packages_to_priority_upgrade_list('rpmdrake', 'perl-Glib', 'perl-Gtk2'); -my ($priority_state, $priority_requested); +my $priority_state; our $need_restart; our $probe_only_for_updates; @@ -382,6 +382,7 @@ sub get_updates_list { %limit_preselect ); + require Rpmdrake::gui; my %common_opts = ( callback_choices => \&Rpmdrake::gui::callback_choices, priority_upgrade => $urpm->{options}{'priority-upgrade'}, @@ -507,12 +508,7 @@ sub get_pkgs { get_updates_list($urpm, $db, $state, $requested, \@requested, \@requested_strict, \%all_pkgs, %filter); } - if ($need_restart) { - $priority_state = $state; - $priority_requested = $requested; - } else { - ($priority_state, $priority_requested) = (); - } + $priority_state = $need_restart ? $state : undef; if (!$probe_only_for_updates) { $urpm->compute_installed_flags($db); # TODO/FIXME: not for updates -- cgit v1.2.1