aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-24 11:07:52 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-24 11:07:52 +0000
commit6485d7bc70defbad7f42f0180f78b4ecfb89a83b (patch)
tree84e277aff6826769389add7f8e9cab850b3f891e
parentb490dbd8a87f806491aa4e9083fb7792fbd53501 (diff)
downloadrpmdrake-6485d7bc70defbad7f42f0180f78b4ecfb89a83b.tar
rpmdrake-6485d7bc70defbad7f42f0180f78b4ecfb89a83b.tar.gz
rpmdrake-6485d7bc70defbad7f42f0180f78b4ecfb89a83b.tar.bz2
rpmdrake-6485d7bc70defbad7f42f0180f78b4ecfb89a83b.tar.xz
rpmdrake-6485d7bc70defbad7f42f0180f78b4ecfb89a83b.zip
(get_pkgs) make it somewhat more readable
-rw-r--r--Rpmdrake/pkg.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index ee7e78a7..796e77e4 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -509,8 +509,12 @@ sub get_pkgs {
get_updates_list($urpm, $db, $state, $requested, \@requested, \@requested_strict, \%all_pkgs, %filter);
}
- $priority_state = $need_restart ? $state : undef;
- $priority_requested = $need_restart ? $requested : undef;
+ if ($need_restart) {
+ $priority_state = $state;
+ $priority_requested = $requested;
+ } else {
+ ($priority_state, $priority_requested) = ();
+ }
if (!$probe_only_for_updates) {
$urpm->compute_installed_flags($db); # TODO/FIXME: not for updates