[aur-general] PKGBUILD with side-effects outside of build-dir

George Rawlinson george at rawlinson.net.nz
Sun Sep 6 00:22:46 UTC 2020

On 20-09-06 01:30, Knut Ahlers wrote:
>Hey there,
>Today I received a comment [1] on one of the packages I'm maintaining
>asking for a change which I'm really not sure about:
>Basically the requested change is to have the build use an external
>environment variable (if set) which allows the packager to use an
>directory outside of the current build directory (the directory
>`makepkg` was executed in) for build assets.

It seems that the same question has been asked on `tealdeer`[2].

I'm not a fan of environment variables having side-effects on the system
used for building. It's not ideal when files are littered all over the
system and it's not immediately obvious that it has been done.

>Act as isolated as possible, not reacting to outside influences (like
>env-vars) though this will never be fully achieved without some
>wrapper wiping all env-vars from the outside…

This is the solution that I prefer, and currently utilise with packages
being built in a chroot instance. This way, all build artifacts can be
reliably nuked from the chroot on next rebuild.

[1]: https://aur.archlinux.org/packages/dust/#comment-764039
[2]: https://aur.archlinux.org/packages/tealdeer/#comment-764037

George Rawlinson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20200906/c94711a1/attachment.sig>

More information about the aur-general mailing list