Make the progress bar follow the transaction it was supposed to be watching
It sat at "0 of 218 items" for an entire run. The watcher looked for "(120/218) upgrading foo", which pacman only prints when it is drawing its progress bar - and the unattended runs this exists for are precisely the ones started with --noprogressbar, where it instead prints "upgrading glibc..." with no counter at all. So nothing ever matched and the position never moved. Both shapes are handled now. Where there is no counter the packages are tallied here, one line each, and the total is read from the "Package (218)" header pacman prints before it starts - a better number than checkupdates gives, since that counts packages with an update available and knows nothing about new dependencies pulled in alongside them. Replayed against a real 218-package run from the log: 63, 137, 215, 218 of 218, with the package name in each step. Offer to switch off CachyOS's reboot notification while enabling. cachyos-hooks ships a PostTransaction hook that pops up "Reboot recommended!" the moment a kernel, driver or systemd package is unpacked. That is fine for a manual upgrade, where the transaction is the last thing happening. In an unattended one it lands mid-run, with AUR packages still to build and Flatpaks still to pull, and asking for a restart there is an invitation to cut the update in half. Overriding the hook by name from /etc/pacman.d/hooks is the standard way to switch a distribution hook off and is undone by deleting the link. Offered rather than done, like the existing cachy-update prompt: it is another package's behaviour and it applies to manual upgrades too.
This commit is contained in:
1 parent
6aa9b147b8
commit
ea3f0d21fa
5 files changed
+117
-21
No files matched your search
@@ -8,7 +8,7 @@
|
||||
# Overridable so a packager can pass the version it is actually building
|
||||
# (`make VERSION=$pkgver`). The literal below is the fallback for builds
|
||||
# straight from a checkout, and is what a release tag has to carry.
|
||||
VERSION ?= 1.2.0
|
||||
VERSION ?= 1.2.1
|
||||
|
||||
PREFIX ?= /usr
|
||||
DESTDIR ?=
|
||||
|
||||
Reference in new issue
Block a user