0

I'm using an AUR helper (Yay) on an Arch Linux system. I want to modify the PKGBUILD file for a particular package (ffmpeg-git) prior to compiling the package (I'm enabling hardware encoding/decoding).

I think I see how to do this with

yay --editmenu -S ffmpeg-git

and adding the necessary switches with an editor from "within" Yay. When upgrading the system, I could do more or less the same thing.

This seems rather clunky, however. Arch Linux "wants" to be updated frequently and I'd prefer to reduce the touch-time associated with each update.

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .