Skip to content

piuparts: clean chroot between tests

Sylvain Beucler requested to merge beuc/pipeline:piuparts-no-hard-link into master

Our piuparts task currently uses an extracted chroot (-e / --existing-chroot) and uses hard-linking for efficient copying (--hard-link, similar to cp -l).

However, a piupart run might modify the hard-linked files directly (chmod, chown, append access, etc.), which will alter both the current chroot and its template, hence impact all later runs.

At Salsa, piuparts is run once for each binary packages from the tested source package, so this issue does happen and was reported in particular at #275 (closed), with reproducers.

Dropping --hard-link fixes this issue by copying the chroot template through a classic, clean, independent recursive copy.

This is possibly a little slower, though depending on other factors of the Salsa setup (e.g. tmpfs, FS cache...), and compared to the time/resources otherwise consumed by piuparts, the performance change is probably minor/negligible.

Closes: #275 (closed)

Merge request reports

Loading