Is it better for s-i-dbus to prevent suspends than the system-settings ui?
If so, these would be the steps s-i-dbus takes:
* Do nothing during CheckForUpdate(). If system suspends during this method, it should be easy enough to just recheck.
* Call requestSysState(1) first thing during DownloadUpdate()
* Call clearSysState() when the update finished for any reason (i.e. UpdateDownloaded success signal, UpdateFailed failiure signal,
or UpdatePaused signal)
* Call requestSysState(1) when a paused update is resumed.
This means that when the ui calls ApplyUpdate() we will *not* requestSysState(1) since the reboot will happen almost immediately. Although, if the state is automatically reset upon reboot, we could probably do it without much harm.
This also means that during a paused download, the system could still suspend.
I think that's it; can you think of anything else?
Oh, I think I understand. You want system-image-dbus to prevent suspends while it's downloading via the powerd dbus api?
Is there any better documentation of this api than this page: https:/ /wiki.ubuntu. com/powerd and http:// www.mattfischer .com/blog/ ?p=460 or UTSL?
Is it better for s-i-dbus to prevent suspends than the system-settings ui?
If so, these would be the steps s-i-dbus takes:
* Do nothing during CheckForUpdate(). If system suspends during this method, it should be easy enough to just recheck.
* Call requestSysState(1) first thing during DownloadUpdate()
* Call clearSysState() when the update finished for any reason (i.e. UpdateDownloaded success signal, UpdateFailed failiure signal,
or UpdatePaused signal)
* Call requestSysState(1) when a paused update is resumed.
This means that when the ui calls ApplyUpdate() we will *not* requestSysState(1) since the reboot will happen almost immediately. Although, if the state is automatically reset upon reboot, we could probably do it without much harm.
This also means that during a paused download, the system could still suspend.
I think that's it; can you think of anything else?