Give better error messages on database locking failures
This was noted when trying to perform an operation on a pacman database
on a read-only file system. Print the actual underlying errno string,
and only show the "you can remove" message if the lock file actually
exists.
Before:
$ pacman -Su
error: failed to init transaction (unable to lock database)
if you're sure a package manager is not already
running, you can remove /e/db.lck
After:
$ pacman -Su
error: failed to init transaction (unable to lock database)
error: could not lock database: Read-only file system
Signed-off-by: Dan McGee <dan@archlinux.org>
0 files changed, 0 insertions, 0 deletions