Closed samsapti closed 1 year ago
Confirm. I reproduced this error. Added check node version in build step to ensure that right version https://aur.archlinux.org/cgit/aur.git/commit/PKGBUILD?h=ledger-live-git&id=dc4e7c2a4e6ffe7aad9b7fcd5a889adb6541fa09
I will move install NodeJS to build step for packages which I maintain.
Assuming the env will be preserved is a mistake a lot of people often make and it should be fixed in the pkgbuild.
If I ever get around to it I'll be forcing makepkg to reset the env between functions.
@Morganamilo interesting, thanks for pointing out.
Is that how makepkg
actually should work?
yes, see Jguer/yay#1006 especially the comment from one of the makepkg devs:
You may consider this to be my advice that the recommended way to write a PKGBUILD is to declare your variables in every function that needs them, or alternatively in the global scope.
Affected Version
paru v1.11.1 - libalpm v13.0.2
Artix Linux
Description
The environment is not preserved between build steps, such as
prepare()
andbuild()
. For instance, this causes building the packageledger-live
to fail, asprepare()
usesfnm
to alterPATH
. When building manually withmakepkg -si
, the environment is preserved and building works fine.Output
To demonstrate, I've added
echo "$PATH"
to the end ofprepare()
and the start ofbuild()
.Output of
paru -S ledger-live
:Output of
makepkg -si
:paru.conf
:pacman.conf
: