Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2017-10-30 14:03:28 -0400
committerAllan McRae <allan@archlinux.org>2017-12-07 15:06:10 +1000
commitc50ce453dc4adc1339577e3f0f1010590be3724f (patch)
tree96e512e42c7cd7d1ab937b8a4539892567b97e19 /build-aux
parentad0517d3711b6826cd7a95b99beb36ccd072c2e0 (diff)
makepkg: reorganize the restoration of settings by precedence
The extra variables on the commandline were inconsistently applied. They should override anything else, instead, most were overridden by environment variables with the exception of BUILDDIR (and this was not sanity-checked to see if it had write permissions). e.g. given the commandline: `PKGDEST="$(pwd)"` BUILDDIR="$(pwd)" makepkg PKGDEST=/doesnt/exist BUILDDIR=/doesnt/exist` We would incorrectly use the current working directory for PKGDEST. Meanwhile, we checked the wrong directory for BUILDDIR, and later errored when we tried to create $srcdir inside the non-writable directory "/doesnt/exist". In order to fix this, use the preferred bash builtin for saving variable definitions, similar to how we restore traps etc. rather than tediously redefining each one by hand, and restore this immediately after makepkg.conf is sourced. Finally, the `make`-style commandline overrides are applied. Also canonicalize_path is applied only on the final paths we try to use. While it is unlikely the value in makepkg.conf will be a relative path, since we now properly respect commandline overrides, they should be canonicalized as well. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'build-aux')
0 files changed, 0 insertions, 0 deletions