How to install a modified PKGBUILD with AUR dependencies

I use a AUR package and normally I would use yay -S packagename to install it and all it’s dependencies. The problem is I need to modify the PKGBUILD prior to installing. I can download the AUR package with git and modify PKGBUILD, but I can’t run makepkg -si because there are AUR dependencies that makepkg -si doesn’t handle.

So I’m looking for a way to either use yay to install my package from the directory where I cloned the AUR packages and edited or have makepkg install AUR dependencies.

All I’ve been able to do up to this point is make a shell script with a bunch of yay commands for all the AUR dependencies and then makepkg -si.

Any ideas on improving this?

yay has the --editmenu option that should solve your problem. Look it up in the manpage.

Unless it changed with the recent updates, yay calculates dependencies prior to the edits so you can change deps that way.

However, paru allows this.


so it sounds like yay could be a problem if it’s one of the dependencies in the PKGBUILD file that needs editing. I’ll run some tests and look at paru

I think this is the way to go. I’ll do a new install of EOS tomorrow and use the yay or paru --editmenu for my AUR package

So what about updates? I know that yay saves the files it modified because of the --editmenu session as well as the dependencies, etc in the .cache/yay directory.

How do I run an update if I know that the github repository I used has an update commit. I’m want to run the update with the same --editmenu changes I did the first time.