El 20/12/23 a las 21:08, Rafael Laboissière escribió:
HOME := $(shell mktemp -d)

so that the same directory is never used twice between consecutive builds.

Yes, this is a much better solution. Thanks for the suggestion. I am just 
wondering: is there a simple way to delete the temporary directory after he 
build is finished ?

I don't know, but most people build packages in temporary/disposable chroots,
so if the package just writes a few files which are also small, it's not
something for which I would worry too much.

Personal note: I also used to worry about that in my archive rebuilds. In fact,
I collected the information about how much junk each package created at /tmp,
with the idea of reporting the extreme cases some day.

This was a problem because I was using the "default" profile
for schroot (i.e. /etc/schroot/default), which bind-mounts the /tmp
in the chroot to the /tmp in the host machine.

But now I've recently switched to the "sbuild" profile, which I use with
either overlayfs or with file-based chroots, so the chroot used for
each package build, including /tmp, is completely new each time.

This is really the "normal thing". If you look at any build log at
buildd.debian.org, you will see something like this:

Purging /<<BUILDDIR>>
Not cleaning session: cloned chroot in use


Thanks.

Reply via email to