Put a progress bar on the desktop, and repair the notifications around it
An unattended run takes twenty minutes and said nothing at all while it worked. The notification area now carries a live entry for the duration - which step is running, which package is being unpacked, item count, percentage. It is a job in the sense of org.kde.JobViewServer, the same mechanism Dolphin uses while copying files, rather than a notification, which is what makes it a real bar instead of a line of text. That mechanism needs a process of its own. The desktop ties a job to the D-Bus connection that requested it and withdraws it the moment that connection closes, so gdbus, busctl and dbus-send cannot drive one at all - every invocation is a fresh connection that closes again immediately. A small helper therefore runs inside each graphical session for the length of the update, holding the connection open and taking instructions on stdin. It needs python-gobject; without it there is no bar and nothing else changes. Position within the repository step is read from pacman's own "(120/260) upgrading foo" lines. Its other (n/m) sequences are ignored on purpose: checking keys, package integrity and loading files each count up to the same total, and following them would run the bar to the end three times before the first package was unpacked. The "system updated" notification never arrived, which is what prompted looking at any of this. Tagged notifications were posted with --replace-id naming the start message, and Plasma silently drops a Notify() whose replaces_id points at an expired notification: no bubble, no error, and the id it hands back is the dead one it just ignored. The start bubble times out in seconds and a run lasts minutes, so the result fell into exactly that hole every single time. The previous message is now withdrawn and a fresh one posted. How long a message stays is set per message rather than left to the daemon. Anything reporting that the machine still needs a person - a failed update, a locked package database, packages that had to be held back - waits until it is dismissed. Everything else times out on its own, a successful update included; nothing should have to be clicked away for having gone right. Daemons do keep critical-urgency messages up and the specification asks them to, but that is a should, it says nothing about the normal-urgency messages here that still need somebody to act, and urgency separately governs sound and do-not-disturb. "Restart recommended" is gone, and NotifyReboot with it. The running kernel loses its module tree the moment pacman unpacks the new one, so the notice fired while the run was still building AUR packages and pulling Flatpaks, where it reads as an invitation to restart in the middle of an update. The state is still recorded and cachy-auto-update status still reports it. The option went rather than only its default, because an installed system keeps its own configuration file and would have carried on notifying regardless.
This commit is contained in:
1 parent
a17aed4b3d
commit
6aa9b147b8
17 files changed
+789
-68
No files matched your search
@@ -218,6 +218,28 @@ msgstr ""
|
||||
msgid "Without a command an interactive menu is shown."
|
||||
msgstr ""
|
||||
|
||||
#. Progress bar
|
||||
msgid "Repository packages"
|
||||
msgstr ""
|
||||
|
||||
msgid "AUR packages"
|
||||
msgstr ""
|
||||
|
||||
msgid "Flatpaks"
|
||||
msgstr ""
|
||||
|
||||
msgid "AppImages"
|
||||
msgstr ""
|
||||
|
||||
msgid "Cleaning up"
|
||||
msgstr ""
|
||||
|
||||
msgid "Package"
|
||||
msgstr ""
|
||||
|
||||
msgid "The update was stopped before it finished."
|
||||
msgstr ""
|
||||
|
||||
#. Notifications
|
||||
msgid "System updated"
|
||||
msgstr ""
|
||||
@@ -232,12 +254,6 @@ msgstr ""
|
||||
msgid "Something went wrong while updating. Run 'cachy-auto-update log' for details."
|
||||
msgstr ""
|
||||
|
||||
msgid "Restart recommended"
|
||||
msgstr ""
|
||||
|
||||
msgid "A new kernel was installed. Please restart when it suits you."
|
||||
msgstr ""
|
||||
|
||||
msgid "Package database locked"
|
||||
msgstr ""
|
||||
|
||||
@@ -291,9 +307,6 @@ msgstr ""
|
||||
msgid "Notify when something goes wrong"
|
||||
msgstr ""
|
||||
|
||||
msgid "Notify when a restart is needed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Time between update runs"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -219,6 +219,28 @@ msgstr "Version anzeigen"
|
||||
msgid "Without a command an interactive menu is shown."
|
||||
msgstr "Ohne Befehl wird ein interaktives Menü angezeigt."
|
||||
|
||||
#. Progress bar
|
||||
msgid "Repository packages"
|
||||
msgstr "Paketquellen"
|
||||
|
||||
msgid "AUR packages"
|
||||
msgstr "AUR-Pakete"
|
||||
|
||||
msgid "Flatpaks"
|
||||
msgstr "Flatpaks"
|
||||
|
||||
msgid "AppImages"
|
||||
msgstr "AppImages"
|
||||
|
||||
msgid "Cleaning up"
|
||||
msgstr "Wird aufgeräumt"
|
||||
|
||||
msgid "Package"
|
||||
msgstr "Paket"
|
||||
|
||||
msgid "The update was stopped before it finished."
|
||||
msgstr "Das Update wurde vor dem Ende abgebrochen."
|
||||
|
||||
#. Notifications
|
||||
msgid "System updated"
|
||||
msgstr "System aktualisiert"
|
||||
@@ -233,12 +255,6 @@ msgstr "Update fehlgeschlagen"
|
||||
msgid "Something went wrong while updating. Run 'cachy-auto-update log' for details."
|
||||
msgstr "Beim Update ist etwas schiefgelaufen. Details mit „cachy-auto-update log“."
|
||||
|
||||
msgid "Restart recommended"
|
||||
msgstr "Neustart empfohlen"
|
||||
|
||||
msgid "A new kernel was installed. Please restart when it suits you."
|
||||
msgstr "Es wurde ein neuer Kernel installiert. Bitte bei Gelegenheit neu starten."
|
||||
|
||||
msgid "Package database locked"
|
||||
msgstr "Paketdatenbank gesperrt"
|
||||
|
||||
@@ -293,9 +309,6 @@ msgstr "Melden nach erfolgreichem Update"
|
||||
msgid "Notify when something goes wrong"
|
||||
msgstr "Melden, wenn etwas schiefgeht"
|
||||
|
||||
msgid "Notify when a restart is needed"
|
||||
msgstr "Melden, wenn ein Neustart nötig ist"
|
||||
|
||||
msgid "Time between update runs"
|
||||
msgstr "Abstand zwischen Update-Läufen"
|
||||
|
||||
|
||||
Reference in new issue
Block a user