The problem with persistent modifications to a PKGBUILD when using an AUR helper is that depending on which helper you use, you may not have the modified PKGBUILD cached at all, or it may require overwriting your local modifications in order to correctly pull updates for a -git package.
In the general case, this is sort of solved by customizepkg (and various clones or reinventions that run arbitrary commands or patches instead of configuration keys), but many AUR helpers do not implement this. Many experienced users will instead opt to git commit
their own changes to the PKGBUILD, and treat it as a personally-maintained package which they build by hand, periodically using git pull --rebase
to retrieve changes to the PKGBUILD and then replay their own changes on top.
"yay" in particular is an AUR helper which (as its manpage describes) is geared towards batch interactions and minimizing the amount of time spent paying attention to your updates. So even if it implemented customizepkg
, it would not detect updates to metadata (such as added dependencies) since it will not reinterpret the PKGBUILD after it is modified. Internally, it uses the AUR's json interface to resolve all recursive package dependencies even before downloading any PKGBUILDs.