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.
114 lines
4.4 KiB
Plaintext
114 lines
4.4 KiB
Plaintext
# cachy-auto-update configuration
|
|
#
|
|
# One "Key=Value" per line, '#' starts a comment. The file is parsed, never
|
|
# sourced, so shell syntax has no special meaning here.
|
|
#
|
|
# After editing run: systemctl restart cachy-auto-update.timer
|
|
# Documentation: man cachy-auto-update
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Main switches - normally set through `cachy-auto-update enable/disable`
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Apply updates automatically in the background.
|
|
# Off after installation: a freshly installed package should not start
|
|
# rebuilding the machine before anybody asked it to.
|
|
Enabled=no
|
|
|
|
# Show a desktop notification after an update, and whenever something needs
|
|
# attention.
|
|
Notifications=yes
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# When
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# How much time has to pass between two update runs. Accepts a plain number of
|
|
# seconds or a suffix of s, m, h, d, w.
|
|
# The systemd timer ticks hourly regardless; this is what decides whether a
|
|
# tick actually does anything, which is also how a postponed run retries.
|
|
UpdateInterval=1d
|
|
|
|
# Never update while the battery is below this percentage. Ignored on mains
|
|
# power and on machines without a battery.
|
|
MinBatteryPercent=40
|
|
|
|
# Update only while plugged in. Stricter than MinBatteryPercent.
|
|
RequireAC=no
|
|
|
|
# Postpone the update while a game is running (GameMode, known game processes,
|
|
# or an application blocking idle).
|
|
SkipWhenGaming=yes
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# What
|
|
# ---------------------------------------------------------------------------
|
|
|
|
UpdateAUR=yes
|
|
UpdateFlatpak=yes
|
|
UpdateAppImages=yes
|
|
|
|
# Also rebuild -git / -devel AUR packages. Off by default: these rebuild
|
|
# constantly and break more often than released packages.
|
|
UpdateDevel=no
|
|
|
|
# Which AUR helper to use: auto, paru, yay or pikaur.
|
|
AURHelper=auto
|
|
|
|
# When a new package has to replace or remove an existing one, decide it
|
|
# automatically instead of aborting the update. Straightforward replacements
|
|
# are handled either way; this covers the case where pacman would otherwise
|
|
# stop and ask.
|
|
AutoResolveConflicts=yes
|
|
|
|
# Packages that are never updated automatically, space separated.
|
|
# Example: IgnorePkg=linux linux-headers nvidia
|
|
IgnorePkg=
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Housekeeping
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Trim the pacman package cache after an update: drop the older versions of
|
|
# installed packages, and every cached version of packages that are no longer
|
|
# installed. Nothing that is currently installed is ever touched, so this only
|
|
# costs the ability to downgrade further back than KeepOldPackages.
|
|
# Without it /var/cache/pacman/pkg grows forever - tens of gigabytes on a
|
|
# machine with a few large packages.
|
|
CleanCache=yes
|
|
|
|
# How many old versions per package to keep when CleanCache is on. 3 is the
|
|
# Arch default and leaves room to downgrade. Set it to 1 if disk space matters
|
|
# more than that; on a machine with a handful of multi-gigabyte packages the
|
|
# difference is easily ten gigabytes.
|
|
KeepOldPackages=3
|
|
|
|
# Remove packages nothing depends on any more: pacman packages that were pulled
|
|
# in as dependencies and are now unreferenced, plus Flatpak runtimes no
|
|
# installed application uses.
|
|
# Off by default, and unlike CleanCache this one deletes installed software:
|
|
# "orphaned" only means no other package requires it, which is also true of
|
|
# something installed deliberately as a dependency of nothing.
|
|
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
|
|
|
|
# Report failures.
|
|
NotifyOnError=yes
|
|
|
|
# Point out that a kernel update needs a restart. The machine is never
|
|
# restarted automatically.
|
|
NotifyReboot=yes
|