diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-07-21 14:38:04 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-07-21 14:38:04 +0000 |
commit | 49d25f58656a2124f38dacd1c3c769c8feccec8d (patch) | |
tree | 2908922e471f78e003086d95e6aa8b9cc29d8ac8 /mdkapplet | |
parent | 7761dd2ae8231e34ba74458191490c7c84655b47 (diff) | |
download | mgaonline-49d25f58656a2124f38dacd1c3c769c8feccec8d.tar mgaonline-49d25f58656a2124f38dacd1c3c769c8feccec8d.tar.gz mgaonline-49d25f58656a2124f38dacd1c3c769c8feccec8d.tar.bz2 mgaonline-49d25f58656a2124f38dacd1c3c769c8feccec8d.tar.xz mgaonline-49d25f58656a2124f38dacd1c3c769c8feccec8d.zip |
(clean_distro_cache) factorize code
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -353,6 +353,10 @@ sub is_there_a_new_distributions() { my ($mdv_update_pid, $checker_pid, $media_manager_pid, $locked_count); +sub clean_distro_cache() { + undef $new_distro; + } + # Signal management sub harvester { my ($_signame, $_clean) = @_; @@ -364,7 +368,7 @@ sub harvester { if ($mdv_update_pid && $mdv_update_pid == $childpid) { undef $mdv_update_pid; # make sure to not report new distro after distro upgrade: - undef $new_distro; + clean_distro_cache(); $schedule_checks = 1; } elsif ($checker_pid && $checker_pid == $childpid) { undef $checker_pid; @@ -485,7 +489,7 @@ sub silentCheck() { state $check_time; my $new_time = time(); if (!$check_time || $new_time - $check_time > $config{DISTRO_CHECK_DELAY}) { - undef $new_distro; + clean_distro_cache(); $check_time = $new_time; is_there_a_new_distributions(); } |