summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-07-21 14:38:04 +0000
committerThierry Vignaud <tv@mandriva.org>2009-07-21 14:38:04 +0000
commit49d25f58656a2124f38dacd1c3c769c8feccec8d (patch)
tree2908922e471f78e003086d95e6aa8b9cc29d8ac8 /mdkapplet
parent7761dd2ae8231e34ba74458191490c7c84655b47 (diff)
downloadmgaonline-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-xmdkapplet8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdkapplet b/mdkapplet
index 00c9a743..623e099f 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -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();
}