diff options
author | Leah Rowe <leah@libreboot.org> | 2024-04-25 19:08:53 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-04-25 19:08:53 +0100 |
commit | 08859bb4a56b282cb566c262bd591d7271308ef3 (patch) | |
tree | 8c288084785aab7b159c58adbdc88d61260cdef8 /config/coreboot/dell9020sff_12mb/target.cfg | |
parent | f5f2c58a0e06d629b28e2dfb14c5dcf169626568 (diff) |
lbmk: export TMPDIR from err.sh, not build
lbmk sets TMPDIR to /tmp, and then creates a tmpdir, then
exports *that* as the value of TMPDIR. this unified TMPDIR
location then contains all subsequent files and directories,
when any script or program makes use of /tmp, via mktemp. at
least, that's the theory!
in practise, because it was only being properly exported from
the main build scripts, subscripts that are then called were
not exporting it, at least that is my assumption because in
some cases, i found that the coreboot build system was leaving
errant files behind outside of our own TMPDIR, and that build
system did not seem to be setting TMPDIR itself; more debugging
is needed.
anyway: use the exact same logic, but do it from err.sh. since
err.sh is included from every lbmk script, that means it will
always be exported when running every single part of lbmk. this
should reduce the chance that mktemp creates files and directories
outside of our custom TMPDIR location.
this is because in lbmk, we mitigate unhandled tmpdirs/files by
unifying it in the manner described, then deleting the entire
TMPDIR on exit from the main lbmk parent process (the main
script that the user called from, which is always the "build"
file).
in lbmk, effort is made to clean up temporary files properly,
without relying on this catch-all, but we can't rely on that.
the catch-all should also be as robust as possible.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/coreboot/dell9020sff_12mb/target.cfg')
0 files changed, 0 insertions, 0 deletions