FS#55975 - Move /var/lib/pacman/db.lck to /run/pacman/db.lck
Attached to Project:
Pacman
Opened by Hawky (p90) - Friday, 13 October 2017, 08:17 GMT
Last edited by Allan McRae (Allan) - Friday, 13 October 2017, 08:56 GMT
Opened by Hawky (p90) - Friday, 13 October 2017, 08:17 GMT
Last edited by Allan McRae (Allan) - Friday, 13 October 2017, 08:56 GMT
|
Details
As /var/lib/pacman/db.lck is only useful to indicate that a
pacman instance is running,
it should be deleted after a reboot. Also, /run is much more in the spirit for this kind of file as it is for files which have meaning only for currently running programs. Thanks in advance, p90 |
This task depends upon
Closed by Allan McRae (Allan)
Friday, 13 October 2017, 08:56 GMT
Reason for closing: Not a bug
Additional comments about closing: Interrupted pacman runs should leave a persistent file.
Friday, 13 October 2017, 08:56 GMT
Reason for closing: Not a bug
Additional comments about closing: Interrupted pacman runs should leave a persistent file.
I do not think this will change.
Deleting that file after a reboot would delete the only warning users have, and therefore lead to many systems which were broken anyway but now would never get fixed.
tl;dr
The fact that it is not a temporary file is a core part of the entire pacman philosophy. It will never ever be changed.
1. The lock file does not exist to to indicate an aborted pacman run. It exists to show that a pacman instance is running.
2. It is not useful no have the lock file after a reboot because all users are told to do in this case is to delete the lock file.
3. How is this a core part of the pacman philosophy? Why are people then told to just delete the lock file? This is literally what pacman tells you to do:
[foo@bar ~]$ pacman -Syu
:: Synchronizing package databases...
core is up to date
:: Starting full system upgrade...
resolving dependencies...
Terminated
[foo@bar ~]$ pacman -Syu
:: Synchronizing package databases...
error: failed to update core (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
So if there is any more to this file then to indicate a running pacman instance, you might want to tell the people writing pacman
because they apparently do not know about that.