Affected Version
yay --version
yay v13.0.1 - libalpm v16.0.1
Describe the bug
If yay is ran from root and then immediately exited while syncing, it leaves a hanging db.lck.
Note this is on an SSH session (ssh root@hostname), running zsh, may or may not be relevant.
Reproduction Steps
yay under root account - regular user works fine
CTRL+C instantly
yay -> won't run cause of locked database
Expected behavior
yay removes db.lck just like it does so when running under a regular user
Output
--debug does not log anything new at all after CTRL+C is pressed so I presume it's useless here
[130] # yay
-> Avoid running yay as root/sudo.
:: Synchronising package databases...
core-testing is up to date
core is up to date
extra-testing is up to date
extra 15.8 KiB 0.00 B/s --:-- [Co o o o o o o o o o o o o o o o o o o o o o o o o ] 0%
^Cultilib-testing 697.0 B 7.16 KiB/s 00:00 [----------------------------------------------------------------------------] 100%
[130] # yay
-> Avoid running yay as root/sudo.
-> /var/lib/pacman/db.lck is present.
-> There may be another Pacman instance running. Waiting...^C
Affected Version
Describe the bug
If
yayis ran fromrootand then immediately exited while syncing, it leaves a hangingdb.lck.Note this is on an SSH session (
ssh root@hostname), running zsh, may or may not be relevant.Reproduction Steps
yayunderrootaccount - regular user works fineCTRL+Cinstantlyyay-> won't run cause of locked databaseExpected behavior
yay removes db.lck just like it does so when running under a regular user
Output
--debugdoes not log anything new at all after CTRL+C is pressed so I presume it's useless here