[Piuparts-devel] Hard links patch for bug #754878 makes little sense

Alexander Thomas alexander.thomas at esaturnus.com
Fri Oct 14 13:53:49 UTC 2016


In July 2014, a patch was included to use `cp -al` instead of `cp -ax`
when the -e option is used and the chroot is on the same filesystem as
where piuparts is run. I wonder why this was included without making
it optional, or maybe why it was included at all.

Hard-linking the chroot makes little sense unless there is a guarantee
that none of the existing files will be modified. The only difference
with just running the test in the provided chroot itself, is that new
or deleted files will not be reflected in the original directory.
Modifications to existing files however will be reflected in the
original chroot, because of the hard links. Because the whole point of
piuparts testing is to detect unexpected changes, at some point a
naughty package will clobber existing files, and this change will
persist.
Maybe the submitter of the patch mistook `cp -al` as a copy-on-write,
or didn't mind that this would make the -e option of piuparts
destructive.

In our setup, we perform multiple separate runs of piuparts, and it is
essential to start from a pristine copy of the same chroot every time.
We use the -e option to avoid having to re-generate and customize the
chroot for every test, or unpack the same tarball over and over again.
It is essential that the original chroot is not modified. Relying on
hard links method breaks this workflow unless we wrap every test
inside yet another cp -ax, which again makes everything slower.

If anyone sees a valid use case for the hard linked chroot, an option
to enable it separately should be added. Otherwise this patch should
be reverted.

-- 
Alexander Thomas



More information about the Piuparts-devel mailing list