FS#67412 - Lockfile explanation missing when synchronizing databases
|
Details
Summary and Info:
When pacman fails to acquire its exclusive lock during syncing dbs (-Sy), it doesn't give the same helpful message as when for example upgrading. It took me a few minutes to find out what kind of lock it's talking about because the result is the same as with denied permissions (this might be a specialty of the MSYS2 port though because there's no root account). Steps to Reproduce: $ pacman -Sy :: Synchronizing package databases... error: failed to update foo (unable to lock database) error: failed to update bar (unable to lock database) error: failed to update etc (unable to lock database) error: failed to synchronize all databases $ sudo touch /var/lib/pacman/db.lck $ sudo pacman -Sy :: Synchronizing package databases... error: failed to update foo (unable to lock database) error: failed to update bar (unable to lock database) error: failed to update etc (unable to lock database) error: failed to synchronize all databases $ pacman -Su error: failed to init transaction (unable to lock database) error: could not lock database: File exists if you're sure a package manager is not already running, you can remove /var/lib/pacman/db.lck $ sudo rm /var/lib/pacman/db.lck |
This task depends upon
Comment by David Macek (Elieux) -
Monday, 27 July 2020, 08:04 GMT
Comment by David Macek (Elieux) -
Monday, 27 July 2020, 20:17 GMT
Oops, should've been `sudo pacman -Su` as the fourth command.
From IRC, allanbrokeit: really, we should just check we have a
lock before doing anything and not report it fails for every
database