kas-container: Purge tmp* on clean

OpenEmbedded/Yocto expands TMPDIR by TCLIBCAPPEND. That break our -
granted - simplistic clean operation which assumes TMPDIR to be
"${TOPDIR}/tmp". Relax it a bit. This is still safe as we work on the
generally separate build dir.

An alternative to this would be calling kas shell with a concrete
configuration and ask for the actual TMPDIR and also DL_DIR while at it.
Probably doable, but it would require passing of a config file on each
global clean operation.

Isar layers are not expected expand TMPDIR, so keep things as they are
there.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2023-06-18 21:39:45 +02:00
parent 207d236bae
commit 7f91df6492

View File

@ -121,7 +121,7 @@ run_clean() {
${KAS_CONTAINER_IMAGE} \
sudo rm -rf tmp
else
trace rm -rf "${KAS_BUILD_DIR}/tmp"
trace rm -rf "${KAS_BUILD_DIR}"/tmp*
fi
if [ "$1" != "clean" ]; then