After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677367 - Add "Install updates and restart"
Add "Install updates and restart"
Status: RESOLVED DUPLICATE of bug 677394
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-06-04 07:26 UTC by Florian Müllner
Modified: 2012-06-05 04:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[wip] userMenu: Add system update item (2.81 KB, patch)
2012-06-04 07:26 UTC, Florian Müllner
none Details | Review

Description Florian Müllner 2012-06-04 07:26:48 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.
Comment 1 Florian Müllner 2012-06-04 07:26:55 UTC
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.
Comment 2 Florian Müllner 2012-06-04 07:30:52 UTC
(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) ...
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-06-05 04:22:47 UTC
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 ***