yay v9.3.1 - libalpm v11.0.3
Cam we get a terminal bell before the sudo prompt shows up (especially after a long build) to prompt us that our password has to be entered.
If you missed sudo that means it already built the package. You should be able to go the the yay cache and just pacman -U the package
You can. However this seems like a less then ideal solution. Perhaps we can detect when there is a up to date built package and just install that instead of going through prebuild when clean-build is not chosen.
Or maybe just a desktop notification with notify-send or dunstify?
That also works. However this would not work over ssh and assumes that the user is in an desktop environment.
What about requesting sudo up front and then running sudo -v in the background every minute so at least you don't have to continually check back to see if compilation has finished (else sudo will time out if you don't check back soon enough, and you have to redo everything)? I've seen this technique used before in scripts that perform a similar function to Yay.
What about requesting sudo up front and then running
sudo -vin the background every minute so at least you don't have to continually check back to see if compilation has finished (else sudo will time out if you don't check back soon enough, and you have to redo everything)? I've seen this technique used before in scripts that perform a similar function to Yay.
You mean yay --sudoloop? https://github.com/Jguer/yay/blob/de95a0e2539a804a581a6d3cff32d59637b03057/doc/yay.8#L486-L488
In regards to the feature request itself, I don't like using notify-send or dunstifyexactly for the reasons @alexcote1 pointed out. I'm open to implementation suggestions/examples how other projects deal with it though.
@Jguer Oh, indeed you're right. I feel like this usability problem would be well-addressed if that were the default and you could disable it with --nosudoloop. I guess I can make a configuration file, but the default mode of operation seems strictly inferior given its nondeterminism with respect to depending on how long the build takes.
Doesn't seem to be going anywhere and people clamoring for it seem satisfied with --sudoloop.
@raxod502 , I forgot to answer you but sudoloop is a security vulnerability therefore it won't be set as default. I was actually looking for the pull request where this was thoroughly explained 26 days ago but I couldn't find it.
as of sudo version 1.8.28, sudo has a -B option which sends a terminal bell. You could use the above commits with sudoflags = -B.
https://www.sudo.ws/man/1.8.28/sudo.man.html
Most helpful comment
Doesn't seem to be going anywhere and people clamoring for it seem satisfied with
--sudoloop.@raxod502 , I forgot to answer you but sudoloop is a security vulnerability therefore it won't be set as default. I was actually looking for the pull request where this was thoroughly explained 26 days ago but I couldn't find it.