From ea4c7b6888c962e6e9c5f4b4fe1b2109f6361c57 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 19 Dec 2013 12:23:06 +0100 Subject: [PATCH] Ahora vn-updater solo comprueba nuevas versiones bajo demanda y no periodicamente --- INSTALL | 8 ++++---- debian/changelog | 2 +- src/vn-updater.cc | 17 ----------------- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/INSTALL b/INSTALL index a1e89e1..007e939 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ 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. 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). 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 ====================== @@ -367,4 +368,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/debian/changelog b/debian/changelog index b5cca77..caad236 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -vn-updater (1.2-9) stable; urgency=low +vn-updater (1.2-10) stable; urgency=low * Initial Release. diff --git a/src/vn-updater.cc b/src/vn-updater.cc index c5e499e..c875d14 100644 --- a/src/vn-updater.cc +++ b/src/vn-updater.cc @@ -45,7 +45,6 @@ #include "vn-status.h" #include "vn-updater.h" -#define CHECK_INTERVAL 300 #define PKG_BUFFER_SIZE 256 #define APT_CONFIG_FILE _CONFIG_DIR"/apt.conf" @@ -67,7 +66,6 @@ typedef struct VnUpdater; static void vn_updater_thread (VnUpdater * self); -static gboolean vn_updater_timeout (VnUpdater * self); static gboolean vn_updater_signal_handler (VnUpdater * self); 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, (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_unref (self->main_loop); @@ -471,19 +467,6 @@ static void vn_updater_thread (VnUpdater * self) 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) { g_atomic_int_set (&self->exit, TRUE);