From 7d40350de235aa96e701a6612e78c3247bae41ff Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 21 Jul 2009 14:38:09 +0000 Subject: (is_there_a_new_distributions) check if current distribution is still supported or not (aka whether it's listed or not in eg http://api.mandriva.com/distributions/basic.x86_64.list) --- mdkapplet | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mdkapplet b/mdkapplet index 4577de56..9b75a2b6 100755 --- a/mdkapplet +++ b/mdkapplet @@ -241,7 +241,7 @@ foreach my $opt (@ARGV) { my $root = Rpmdrake::open_db::fast_open_urpmi_db()->{root}; -my $new_distro; +my ($new_distro, $no_more_supported); my $product_id; shouldStart() or die "$localfile should be set to TRUE: please use --force or -f option to launch applet\n"; @@ -329,7 +329,9 @@ sub is_there_a_new_distributions() { $new_distro = $new_distribution; return 1; } - return if !member($product_id->{version}, map { $_->{version} } @distros); + + $no_more_supported = !member($product_id->{version}, map { $_->{version} } @distros); + return if $no_more_supported; if ($new_distribution && $new_distribution->{version} ne $product_id->{version}) { $new_distro = $new_distribution; @@ -343,6 +345,7 @@ my ($mdv_update_pid, $checker_pid, $media_manager_pid, $locked_count); sub clean_distro_cache() { undef $new_distro; + undef $no_more_supported; } # Signal management -- cgit v1.2.1