[gnome-control-center/gnome-3-10] info: check for prepared updates



commit 0f5e433c928031197f2473f799d37a8f50e7963c
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Feb 15 19:08:54 2014 -0600

    info: check for prepared updates
    
    If GNOME Software is installed, we do not want to check if an update is
    actually available, because GNOME Software claims we are up to date
    unless an update has actually been prepared.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720946

 panels/info/cc-info-panel.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index c62ed38..f7ca8a5 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -1838,9 +1838,25 @@ got_pk_proxy_cb (GObject *source_object,
     }
 }
 
+static gboolean
+does_prepared_update_exist (void)
+{
+  return g_file_test ("/var/lib/PackageKit/prepared-update", G_FILE_TEST_EXISTS);
+}
+
 static void
 info_panel_setup_updates (CcInfoPanel *self)
 {
+  if (does_gnome_software_exist ())
+    {
+      if (does_prepared_update_exist ())
+        self->priv->updates_state = UPDATES_AVAILABLE;
+      else
+        self->priv->updates_state = UPDATES_NOT_AVAILABLE;
+      refresh_update_button (self);
+      return;
+    }
+
   self->priv->updates_state = CHECKING_UPDATES;
   refresh_update_button (self);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]