Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#43286 - [paccache] -u option targets all packages if libalpm error
Attached to Project:
Pacman
Opened by Dario Giovannetti (kynikos) - Thursday, 01 January 2015, 04:04 GMT
Last edited by Allan McRae (Allan) - Monday, 12 January 2015, 05:30 GMT
Opened by Dario Giovannetti (kynikos) - Thursday, 01 January 2015, 04:04 GMT
Last edited by Allan McRae (Allan) - Monday, 12 January 2015, 05:30 GMT
|
DetailsRunning `paccache -?u` targets all the packages in the cache if there's a libalpm error.
In particular, this completely clears the cache if used as `paccache -ruk0`. This happened to me because I'm used to running a `paccache -rvv && paccache -rvvuk0` alias after every system upgrade (k=3 by default): with the update to pacman 4.2 (from 4.1) the database should have been upgraded manually, but no news entry was posted in archlinux.org, nor a post-upgrade message was printed by pacman, so I just ran the alias and my cache was cleared. Steps to reproduce: 1) Boot an Arch Linux live installation image with pacman<4.2 2) Run `pacman -Syy pacman` (This puts curl and pacman in the cache) 3) Run `paccache -ruk0` This will output: error: failed to initialize alpm library (database is incorrect version: /var/lib/pacman/) error: try running pacman-db-upgrade ==> finised: 2 packages removed (disk space saved: 1.37 MiB) No package should have been removed, since curl and pacman are still installed. Note that the error message does suggest to run `pacman-db-upgrade`, but in this case it's too late :) Maybe a solution could be stopping `paccache -?u` from working if there's an error. |
This task depends upon
Closed by Allan McRae (Allan)
Monday, 12 January 2015, 05:30 GMT
Reason for closing: Fixed
Additional comments about closing: git commit e8d757b6ba
Monday, 12 January 2015, 05:30 GMT
Reason for closing: Fixed
Additional comments about closing: git commit e8d757b6ba
Aso I'm inclined to thing that paccache never exit on erorr like this, siomply prossed.
(( ${#ign[@]} )) || die 'failed to retrieve the list of installed packages'
No need for any extra line breaks.