Hello !
I'm a new yay user.
I migrated from yaourt very recently.
I've noticed one missing feature compared to yaourt.
I can't edit the PKGBUILD before the install.
It's very useful, because it allows me to remove unwanted dependencies.
I have 2 real examples:
smartgit requires to install java-runtime.
Actually it is not needed because the source archive file provides its own Java runtime.
So I edit the PKGBUILD before an install/update and remove this dependency.
Another example is yay itself.
I'm a Go developer and I use my own Go environment.
I don't need the go Archlinux package.
When I installed yay the first time, using yaourt, I could edit the PKGBUILD and remove the go dependency.
How can I do that with yay ?
Thanks.
See the manpage/help for --editmenu.
Do note that yay doesn't use the pkgbuild for dependencies it uses the RPC. So yay will ignore these changes in its dependency solving. The changes will still apply to the built packages though. This is noted in the FAQ and manpage.
ok, thank you !
If someone has the same problem and is reading this, my workaround is:
yay -G <package_name>PKGBUILDmakepkg -siI think there's no need for a workaround. yay --editmenu -S <package-name> does exactly what you're asking for.
I'm sorry for the (very) late comment. I just wanted to point that out in case somebody else stumbles upon this issue.
@brainplot no, yay installs the dependencies before allowing you to edit the PKGBUILD
Ah, I see. Thanks for the clarification.
Also it seems that (at least) the provides array is cached before the changes.
Most helpful comment
If someone has the same problem and is reading this, my workaround is:
yay -G <package_name>PKGBUILDmakepkg -si