Ahora vn-updater solo comprueba nuevas versiones bajo demanda y no periodicamente

This commit is contained in:
Juan Ferrer Toribio 2013-12-19 12:23:06 +01:00
parent a31f7d0121
commit ea4c7b6888
3 changed files with 5 additions and 22 deletions

View File

@ -1,7 +1,7 @@
Installation Instructions Installation Instructions
************************* *************************
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc. Inc.
Copying and distribution of this file, with or without modification, Copying and distribution of this file, with or without modification,
@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround: an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation `configure' Invocation
====================== ======================
@ -367,4 +368,3 @@ operates.
`configure' also accepts some other, not widely useful, options. Run `configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details. `configure --help' for more details.

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
vn-updater (1.2-9) stable; urgency=low vn-updater (1.2-10) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -45,7 +45,6 @@
#include "vn-status.h" #include "vn-status.h"
#include "vn-updater.h" #include "vn-updater.h"
#define CHECK_INTERVAL 300
#define PKG_BUFFER_SIZE 256 #define PKG_BUFFER_SIZE 256
#define APT_CONFIG_FILE _CONFIG_DIR"/apt.conf" #define APT_CONFIG_FILE _CONFIG_DIR"/apt.conf"
@ -67,7 +66,6 @@ typedef struct
VnUpdater; VnUpdater;
static void vn_updater_thread (VnUpdater * self); static void vn_updater_thread (VnUpdater * self);
static gboolean vn_updater_timeout (VnUpdater * self);
static gboolean vn_updater_signal_handler (VnUpdater * self); static gboolean vn_updater_signal_handler (VnUpdater * self);
int main (int argc, char * argv[]) int main (int argc, char * argv[])
@ -157,8 +155,6 @@ int main (int argc, char * argv[])
g_unix_signal_add_full (G_PRIORITY_HIGH, SIGTERM, g_unix_signal_add_full (G_PRIORITY_HIGH, SIGTERM,
(GSourceFunc) vn_updater_signal_handler, self, NULL); (GSourceFunc) vn_updater_signal_handler, self, NULL);
g_timeout_add_seconds (CHECK_INTERVAL,
(GSourceFunc) vn_updater_timeout, self);
g_main_loop_run (self->main_loop); g_main_loop_run (self->main_loop);
g_main_loop_unref (self->main_loop); g_main_loop_unref (self->main_loop);
@ -471,19 +467,6 @@ static void vn_updater_thread (VnUpdater * self)
while (!g_atomic_int_get (&self->exit)); while (!g_atomic_int_get (&self->exit));
} }
static gboolean vn_updater_timeout (VnUpdater * self)
{
g_mutex_lock (&self->mutex);
if (vn_updater_check (self)
&& self->status == VN_UPDATER_STATUS_UPDATABLE)
vn_updater_update (self, TRUE);
vn_updater_check_apt_errors ();
g_mutex_unlock (&self->mutex);
return TRUE;
}
static gboolean vn_updater_signal_handler (VnUpdater * self) static gboolean vn_updater_signal_handler (VnUpdater * self)
{ {
g_atomic_int_set (&self->exit, TRUE); g_atomic_int_set (&self->exit, TRUE);