Skip to content
Snippets Groups Projects
Commit 75187023 authored by Patrycja Rosa's avatar Patrycja Rosa :cat:
Browse files

abuild: do not export "$srcdir"

several[1][2] build systems use a variable called "srcdir"
to locate either the root project directory, or some subdirectory

we should not blindly export a variable under the same name,
as it leads to broken builds - either loudly, when tests fail,
or quietly when a ""missing"" file simply gets ignored

[1]: https://github.com/PCRE2Project/pcre2/blob/pcre2-10.45/RunTest#L141
[2]: https://github.com/json-c/json-c/blob/json-c-0.18/tests/test-defs.sh#12
parent 2afbdf9f
No related branches found
No related tags found
1 merge request!372abuild: do not export "$srcdir"
Pipeline #310785 passed
......@@ -2614,7 +2614,7 @@ rootbld() {
--hostname "build-$buildhost-$CARCH" \
--chdir "$startdir" \
--clearenv \
--setenv srcdir /tmp/src \
--setenv abuild_srcdir /tmp/src \
--setenv pkgbasedir /tmp/pkg \
--setenv tmpdir /tmp/tmp \
--setenv CARCH "$CARCH" \
......@@ -2937,7 +2937,7 @@ fi
APKBUILD=$(readlink -f "$APKBUILD")
startdir="${APKBUILD%/*}"
srcdir=${srcdir:-"$startdir/src"}
srcdir=${srcdir:-${abuild_srcdir:-"$startdir/src"}}
pkgbasedir=${pkgbasedir:-"$startdir/pkg"}
tmpdir=${tmpdir:-"$startdir/tmp"}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment