GNOME Bugzilla – Bug 677367
Add "Install updates and restart"
Last modified: 2012-06-05 04:22:47 UTC
(Originally filed by Richard Hughes as bug 677387, but apparently lost in the last bugzilla troubles): As part of http://freedesktop.org/wiki/Software/systemd/OSUpgrade and https://live.gnome.org/GnomeOS/Design/Whiteboards/SoftwareUpdates I've added the required bits to PackageKit in git master and would now like to add the UI bits to js/ui/userMenu.js The basics are thus: If the /var/lib/PackageKit/prepared-update file exists then we need to offer the user to: - _Install updates and restart - _Suspend rather than just: - _Suspend If the user clicks "Install updates and restart" then we just need to execute "pkexec /usr/libexec/pk-trigger-offline-update" and then restart the computer the usual way. This will cause the computer to reboot and then update the system with all the pre-prepared updates. The computer will then automatically reboot when the updates are applied into the new system. In the future we'll be using btrfs snapshotting too, so it's a lot safer than just trying to update random packages at runtime whilst the session is running. I'm not exactly a javascript expert, so if anyone can give me a few pointers (or write the patch for me ;) then I'd appreciate it very much. Thanks! Richard.
Created attachment 215521 [details] [review] [wip] userMenu: Add system update item According to the design, we should show an "Install updates and restart" item when updates are available.
(In reply to comment #0) > If the user clicks "Install updates and restart" then we just need to execute > "pkexec /usr/libexec/pk-trigger-offline-update" and then restart the computer > the usual way. "restart the usual way" currently means "popup the power off/restart dialog", which is of course unacceptable. We probably want support for this in gnome-session. I do wonder though if it would be possible to move that part into pk-trigger-offline-update as well - I'm a bit worried that we pop up an authentification dialog for packagekit, and another one for the restart (for instance when other active sessions are found) ...
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 677394 ***