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
1=== modified file 'src/apt-watcher.c'
2--- src/apt-watcher.c 2011-09-14 16:17:55 +0000
3+++ src/apt-watcher.c 2011-09-16 09:14:29 +0000
4@@ -177,8 +177,6 @@
5 "the system bus",
6 name_owner);
7
8- apt_watcher_query_reboot_status (user_data);
9-
10 g_dbus_proxy_call (watcher->proxy,
11 "UpgradeSystem",
12 g_variant_new("(b)", TRUE),
13@@ -299,6 +297,15 @@
14 if (self->current_state != UPGRADE_IN_PROGRESS){
15 query_again = TRUE;
16 }
17+ else{
18+ if (self->reboot_query != 0){
19+ g_source_remove (self->reboot_query);
20+ self->reboot_query = 0;
21+ }
22+ self->reboot_query = g_timeout_add_seconds (1,
23+ apt_watcher_query_reboot_status,
24+ self);
25+ }
26 self->current_state = state;
27
28 g_object_unref (G_OBJECT(self->current_transaction));
29@@ -383,7 +390,7 @@
30
31 GVariant* reboot_result = g_dbus_proxy_get_cached_property (self->proxy,
32 "RebootRequired");
33- gboolean reboot;
34+ gboolean reboot = FALSE;
35 g_variant_get (reboot_result, "b", &reboot);
36 g_debug ("apt_watcher_query_reboot_status: reboot prop = %i", reboot);
37 if (reboot == FALSE){

Subscribers

People subscribed via source and target branches