FS#64291 - [pacman] makepkg {C,CXX,LD}FLAGS not exported in prepare()

Attached to Project: Arch Linux
Opened by bartus (bartus) - Monday, 28 October 2019, 08:03 GMT
Last edited by Dave Reisner (falconindy) - Monday, 28 October 2019, 08:31 GMT
Task Type Support Request
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Just noticed that {C,CXX,LD}FLAGS is present in every function, but in build/pacakage() functions they're exported and in prepare() they're not. Is this intended behavior? I've noticed this when switching my PKGBUILD from cmake to meson. When calling `meson` in prepare() it's omits non exported environment variables, and I have to add `export {C,CXX,LD}FLAGS before `meson` call in prepare().
Proof PKGBUILD:
```
pkgname=test
pkgver=1
pkgrel=1
arch=(x86_64)

prepare() {
declare -p |grep FLAGS
}

build() {
declare -p |grep FLAGS
}

package() {
declare -p |grep FLAGS
}
```
This task depends upon

Closed by  Dave Reisner (falconindy)
Monday, 28 October 2019, 08:31 GMT
Reason for closing:  Not a bug
Additional comments about closing:  working as intended
Comment by Dave Reisner (falconindy) - Monday, 28 October 2019, 08:14 GMT
This is a subtle hint that you're doing it wrong. Call meson setup in build, not prepare.
Comment by bartus (bartus) - Monday, 28 October 2019, 08:18 GMT
Thanks @falconindy, will try to rework those when it's feasible.

Loading...