From e91b9f75bf2d22b0bece4b0ea5af3e602493a78e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 21 Jul 2009 15:37:48 +0000 Subject: (is_there_a_new_distributions) keep latest distro info around so that we can suggest to upgrade to it when running distro is unsupported (harvester) reorder the tests accordingly --- mdkapplet | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mdkapplet b/mdkapplet index 82541af9..0f0dc851 100755 --- a/mdkapplet +++ b/mdkapplet @@ -338,7 +338,10 @@ sub is_there_a_new_distributions() { } $no_more_supported = !member($product_id->{version}, map { $_->{version} } @distros); - return if $no_more_supported; + if ($no_more_supported) { + $new_distro = $new_distribution; + return; + } if ($new_distribution && $new_distribution->{version} ne $product_id->{version}) { $new_distro = $new_distribution; @@ -374,13 +377,13 @@ sub harvester { if ($state) { log::explanations($state->{log}); $sub_state = $state->{status}; - if ($new_distro && $config{DO_NOT_ASK_FOR_DISTRO_UPGRADE} !~ /^true$/i + if ($no_more_supported) { + go2State('no_more_supported'); + } elsif ($new_distro && $config{DO_NOT_ASK_FOR_DISTRO_UPGRADE} !~ /^true$/i && $local_config{DO_NOT_ASK_FOR_DISTRO_UPGRADE} !~ /^true$/i) { go2State('new_distribution'); } else { - if ($no_more_supported) { - $sub_state = 'no_more_supported'; - } elsif ($sub_state eq 'locked') { + if ($sub_state eq 'locked') { $locked_count++; $sub_state = 'loop_locked' if $locked_count > 10; } else { -- cgit v1.2.1