Merge lp:~cjcurran/indicator-session/startup-restart-required into lp:indicator-session/0.1

Proposed by Conor Curran
Status: Merged
Merged at revision: 215
Proposed branch: lp:~cjcurran/indicator-session/startup-restart-required
Merge into: lp:indicator-session/0.1
Diff against target: 37 lines (+10/-3)
1 file modified
src/apt-watcher.c (+10/-3)
To merge this branch: bzr merge lp:~cjcurran/indicator-session/startup-restart-required
Reviewer Review Type Date Requested Status
Ted Gould Pending
Review via email: mp+75687@code.launchpad.net

Description of the change

Removed startup RebootRequired query, this most have been causing the incorrect restart state flagged at start up, also reinserted the call to query the restart required after an upgrade is finished, this apt api is a mystery

To post a comment you must log in.
Revision history for this message
Conor Curran (cjcurran) wrote :

The only other potential cause of the incorrect restart status being flagged is the service receiving a rogue 'PropertyChanged' signal with a 'RebootRequired' prop name and value set to true. If this is the case (I have yet to track it down) this bug belongs to APT, in fact really this whole API needs to be rewritten but that's a different conversation...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/apt-watcher.c'
--- src/apt-watcher.c 2011-09-14 16:17:55 +0000
+++ src/apt-watcher.c 2011-09-16 09:14:29 +0000
@@ -177,8 +177,6 @@
177 "the system bus",177 "the system bus",
178 name_owner);178 name_owner);
179179
180 apt_watcher_query_reboot_status (user_data);
181
182 g_dbus_proxy_call (watcher->proxy,180 g_dbus_proxy_call (watcher->proxy,
183 "UpgradeSystem",181 "UpgradeSystem",
184 g_variant_new("(b)", TRUE),182 g_variant_new("(b)", TRUE),
@@ -299,6 +297,15 @@
299 if (self->current_state != UPGRADE_IN_PROGRESS){297 if (self->current_state != UPGRADE_IN_PROGRESS){
300 query_again = TRUE; 298 query_again = TRUE;
301 } 299 }
300 else{
301 if (self->reboot_query != 0){
302 g_source_remove (self->reboot_query);
303 self->reboot_query = 0;
304 }
305 self->reboot_query = g_timeout_add_seconds (1,
306 apt_watcher_query_reboot_status,
307 self);
308 }
302 self->current_state = state;309 self->current_state = state;
303310
304 g_object_unref (G_OBJECT(self->current_transaction));311 g_object_unref (G_OBJECT(self->current_transaction));
@@ -383,7 +390,7 @@
383 390
384 GVariant* reboot_result = g_dbus_proxy_get_cached_property (self->proxy,391 GVariant* reboot_result = g_dbus_proxy_get_cached_property (self->proxy,
385 "RebootRequired");392 "RebootRequired");
386 gboolean reboot;393 gboolean reboot = FALSE;
387 g_variant_get (reboot_result, "b", &reboot);394 g_variant_get (reboot_result, "b", &reboot);
388 g_debug ("apt_watcher_query_reboot_status: reboot prop = %i", reboot);395 g_debug ("apt_watcher_query_reboot_status: reboot prop = %i", reboot);
389 if (reboot == FALSE){396 if (reboot == FALSE){

Subscribers

People subscribed via source and target branches