You are not logged in.
(I haven't managed to find this mentioned anywhere, however I doubt I'm the only one affected by this, so apologies if this was reported somewhere else)
I've just upgraded to pacman 4.2. Usually after a system upgrade I run:
$ paccache -rvv && paccache -ruvvk0(yes, with an alias
) Unfortunately this time it completely cleared my cache, because pacman's database should have been upgraded first with:
# pacman-db-upgradeI was wondering if there is a reason why we didn't get a news entry to warn about this, unlike e.g. archlinux.fr.
EDIT: Maybe a better solution would be to make paccache check whether it can read pacman's database before attempting to do anything; is there anyone that thinks this is worth a bug report?
Last edited by kynikos (2015-01-13 06:05:09)
Offline
Cleaning the cache immediately after an update is very bad practice. I've done it a few times and always regretted it right away when it turned out I had to downgrade something because the update was buggy, but now the old package I wanted to downgrade to was gone from the cache. Don't do this!
Pick a quiet day without major updates and make sure the system is running perfectly fine as it is without downgrades in sight (i.e. also take the time to test applications you use infrequently!). Then clean the cache.
Offline
Eheh `paccache -rvv` removes all but the last 3 versions of each package in the cache; `paccache -ruvvk0` removes all the cached versions of uninstalled packages instead. You can see `paccache -h`for all the options. (Edit: If I really deliberately cleared the cache after every upgrade I wouldn't have even started this thread in the first place
)
Last edited by kynikos (2014-12-31 14:10:09)
Offline
I deal with pacnew files, pacman-db-upgrade, any syslinux or mkinitcpio issues that crop up when updating my system before doing anything else. Maybe your way of doing things just falls under 'unsupported' i.e. you're on your own.
Try asking on the ML or report a bug / feature request.
Offline
No issues here but I don't run paccache on an update, I run with my bleachbit alias. In this case, I knew in advance that the db needed to get updated... perhaps pacman's post_install scriptlet should warn users to update the db ASAP to avoid these issues. Perhaps a bug report is in order.
Offline
perhaps pacman's post_install scriptlet should warn users to update the db ASAP to avoid these issues. Perhaps a bug report is in order.
If you run a `pacman -Syu` after the update, that advice is given by pacman after the database keyring check fails.
Jin, Jîyan, Azadî
Offline
graysky wrote:perhaps pacman's post_install scriptlet should warn users to update the db ASAP to avoid these issues. Perhaps a bug report is in order.
If you run a `pacman -Syu` after the update, that advice is given by pacman after the database keyring check fails.
The message is:
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgradeOffline
perhaps pacman's post_install scriptlet should warn users to update the db ASAP to avoid these issues. Perhaps a bug report is in order.
graysky wrote:If you run a `pacman -Syu` after the update, that advice is given by pacman after the database keyring check fails.
Yep, the problem is that paccache doesn't exit in case of error, but thinks that an incompatible database is an empty one, so I've indeed reported FS#43286.
Offline
Eheh `paccache -rvv` removes all but the last 3 versions of each package in the cache;
Yes, if it works correctly. But as you just found out, sometimes it fails. So my original point (test your system carefully before you clean the cache) still stands, whether you use paccache or pacman -Sc.
Offline
kynikos wrote:Eheh `paccache -rvv` removes all but the last 3 versions of each package in the cache;
Yes, if it works correctly. But as you just found out, sometimes it fails. So my original point (test your system carefully before you clean the cache) still stands, whether you use paccache or pacman -Sc.
This command should not depend on the pacman database: paccache -rvv
The problems start when using paccache -ruvvk0. If pacman doesn't return the list of installed packages, this command removes everything instead of only uninstalled packages.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
May be next time, you may want to try paccache -dvv before doing paccache -rvv.
Btw I agree that "post_install of pacman" there should be message.
You can not assume that user will figure it out on his own when ERROR occurs the next time.
Offline
Thank you everybody, I've submitted a patch in the bug report: https://bugs.archlinux.org/task/43286#comment131174
If somebody wants to help review it, please comment there.
Edit: the patch was applied.
Last edited by kynikos (2015-01-13 06:05:43)
Offline