On Mon, 6 May 2024 at 22:27, Simon McVittie <s...@debian.org> wrote: > > On Mon, 06 May 2024 at 22:08:56 +0200, Johannes Schauer Marin Rodrigues wrote: > > If [files can be deleted automatically while mmdebstrap is using them], > > how should applications guard against that from > > happening? > > As documented in tmpfiles.d(5), if mmdebstrap takes out an exclusive > flock(2) lock on its chroot's root directory, systemd-tmpfiles should > fail to take out its own lock on the directory during cleanup, and > respond to that by treating the directory as "in use" and skipping it.
That also works, but only as long as mmdebootstrap is actually running, and as far as I understand it is not a long-running service, not sure if it works for this use case