Hi all,
as far as I understand the "TMPDIR" environment variable documented at
https://kas.readthedocs.io/en/latest/command-line.html#environment-variables
is meant to correspond to the TMPDIR variable documented in the yocto
docs:
https://docs.yoctoproject.org/singleindex.html#term-TMPDIR?
If this is the case, then setting it as environment variable can cause
some undesired side-effects, as this variable has a special meaning in
(at least some) shell environments, defining the system-wide temp
directory, as seen here:
➜ ~ docker run --rm debian:bookworm-slim /bin/bash -c "mktemp"
/tmp/tmp.HUIWX7dhxM
vs.
➜ ~ docker run --rm -e TMPDIR=/mnt debian:bookworm-slim /bin/bash -c
"mktemp"
/mnt/tmp.BBdYvSMn4U
This caused me quite some headache after I set this variable as part of
a bigger change within our gitlab ci pipeline in an attempt to avoid
hardcoding this in various scripts and suddently gitlab ci internal
steps started failing:
Downloading artifacts for develop-ci-build-setup (65293)...
FATAL: open /builds/build/tmp/artifacts856143953: no such file or
directory
This could also cause the yocto temp dir to be cluttered with non-yocto
related temp files.
I am therefore wondering if it would be possible to change the
environment variable name for configuring the build tmpdir to something
without a special meaning, such as YOCTO_TMPDIR (I am not quite sure
how this passthrough from env var to yocto var works internally)? What
do you think? Is this an issue you are aware of?
Cheers, Jasper