Yay deadlock... shouldn't give up should keep trying

3 Likes

I still don’t see why it should matter if the pacman step fails because another instance is running. Simply run the same yay command again and it will use the build package and install it. It is like 5 more seconds you need to invest.

Also a package manager looping all the time, until it’s the only instance left, seems like advertising bad practices and possibly introduces failures if a db lock doesn’t work properly.

2 Likes

You didn’t read my original message or two, did you :smiley: Running it again can take HOURS for some apps.

But I found the right place to understand this issue: https://github.com/Jguer/yay/issues/2170 ! Thanks @seeji not sure how I wasn’t able to find it! I also just now when I booted up, saw that there’s a “more about yay” that linked there!

Also… an elegant solution may be to change yay to run as a user yay that can sudo with NOPASSWD. But that wouldn’t be a good default for obvious reasons.

This should never be the case. The package is already built at that point and just needs to be installed.

How would that be more elegant than just using --sudoloop?

2 Likes

If --sudoloop times out 3 times in a row, pam picks it up as a failure and locks sudo for that user until you manually run faillock --user myUsername --reset. I’m looking for a solution that will work not just for me.

(PS When last have you tried to build chromium-git or firefox-git? I will post here when I run into the issue that gave me my trauma, again!:sweat_smile:)

--sudoloop keeps sudo active so the password doesn’t have to rebuilt. There should be no such thing as a sudoloop timeout. That is the whole point of --sudoloop.

If you build a git project with many active commits, then if you rebuild it, there will always be new commits so it will get rebuilt. However, you don’t need to rebuild it. You can simply install the package you already built. It is in your yay cache. You can install it with yay -U

1 Like

Ah that’s it! Thanks I knew I wasn’t going mad :sweat_smile:

Doesn’t --sudoloop just keep running sudo? The sudo command itself times out if you don’t enter anything for several minutes…

Yes but it does it to not allow sudo to timeout. If sudoloop is hitting a timeout condition, something else is wrong.

How can it be a major security issue for the password prompt to stay up longer?

I usually just disable timeout for sudo instead of using --sudoloop personally.

Not the password prompt to stay up longer, but the terminal having super user privileges over a long amount of time. For your PC at home it will usually be harmless, but anywhere else it could be a potential security nightmare.

2 Likes

Ah well, disabling the sudo password prompt timeout like i do solves the issue without the security risk. But yeah you’re right, it’s quite safe at home either way.

My personal and biased opinion - if I were in a place concerned about security, I’d be using makepkg directly and not yay (or any AUR helper for that matter).