Build file edits getting reverted

I want to install libfprint-elanmoc2-git from the AUR, but with my own custom repo. So I cloned the original git repo, changed some files, and ran pamac build libfprint-elanmoc2-git and then clicked “e” so I could edit the PKGBUILD, but after I saved my edits and exited nano it went back to the same prompt:

Edit build files : [e] 
Apply transaction ? [e/y/N]

So then I clicked “e” again, so I could verify my changes were saved, but when it entered nano my changes were reverted. Meaning the file was back to its original state. Is there any way I could edit the build files without my changes getting reverted?

Edit the PKGBUILD before you start the build process?
Like you would do if you used makepkg to build your program.

I think - if I got this right - that the change you make the way you describe is not written back to the original file, but your change is still used to build the program in this one instance.

I’m sorry I don’t get what you mean.

… change the PKGBUILD as well

No, I mean I cloned the source repo of the PKGBUILD and I want to edit the PKGBUILD to use my edited repo as the source repo.

git clone
will clone that repo, copy it to your disk

change directory into the so acquired directory structure - there is the PKGBUILD
and you can edit it
before you start to use it to build your package

Ok, for the time being I will do that, but it would be cool to see the feature work in pamac.

It probably does work - but it may be that your changes remain temporary
only for this one build
but I don’t know that.

You want to install via your local PKGBUILD, not download it from the AUR.

See pamac build --help:

If no package name is given, use the PKGBUILD file in the current directory

Run pamac build in the same directory as the PKGBUILD.

1 Like

Ah, I see.
What happened is:

  • the repo was downloaded/cloned
  • changes where made
  • then, by issuing the command
    pamac build libfprint-elanmoc2-git
    pamac downloaded and used a completely new, fresh copy, totally ignoring the present customized repo

To use his changed files, using just
pamac build
inside that directory
would do what was intended.