Say an update is running before it starts, not only after
Asked what happens if someone shuts the laptop down mid-update, the honest answer turned out to be poor. The inhibitor does stop them - logind refuses and falls back to org.freedesktop.login1.power-off-ignore-inhibit, which is auth_admin_keep - so the desktop answers with an administrator password prompt reading "Power off the system while an application is inhibiting this". systemd ships that string untranslated, it never mentions updates, and no KDE catalog contains any shutdown-blocked text at all. Only systemctl names the reason. So a notification now goes out before the transaction, asking for the machine to be left on. Notifications gained a tag: the result replaces the start message in place rather than stacking a second, contradictory bubble beside it. Tagged notifications also carry a queue flag. "An update is starting" is only meaningful while somebody is looking, so unlike the result it is not spooled for delivery at next login.
This commit is contained in:
1 parent
0f91a79ba6
commit
2eff62f9fd
10 files changed
+94
-11
No files matched your search
@@ -95,6 +95,12 @@ RemoveOrphans=no
|
||||
# Notification detail
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Say that an update has started. Worth keeping on: while one runs, a shutdown
|
||||
# request is refused and the desktop answers with an untranslated polkit
|
||||
# password prompt that never mentions updates. This message is replaced by the
|
||||
# result when the run finishes, so it costs one bubble, not two.
|
||||
NotifyOnStart=yes
|
||||
|
||||
# Say something after a successful update. Nothing is ever shown when there
|
||||
# was nothing to do.
|
||||
NotifyOnSuccess=yes
|
||||
|
||||
Reference in new issue
Block a user