Re: plist-check not reporting orphaned files present in a @comment

From: Mathieu Arnold <mat_at_freebsd.org>
Date: Sat, 19 Aug 2023 08:51:25 UTC
On Wed, Aug 16, 2023 at 08:37:22PM +0200, Felix Palmen wrote:
> IMHO, the straight-forward solution would be: A port hit by that should
> add some "post-install-<opt>" (or -off) recipe explicitly removing the
> unwanted files from ${STAGEDIR}.

Well, it is a solution, but it is slower.

How it works now:

1. some file gets installed
2. that file is not in the plist, so it does not get packaged (actually
   it is @comment'ed, but for pkg, it is the same thing as it not being
   there)

So, that file only has one i/o operation, when it is installed, it then
is left there.  It gets removed when `make clean` is ran, but so are all
files in WRKDIR, so the io hit is low because all the directory is
removed anyway.

What you want to do is :

1. some file gets installed
2. you run rm on it

So, the file now has two i/o operations associated to it, when it is
installed, and when it is removed.  The io hit is higher because only
that file is removed, and then when `make clean` that directory gets hit
again.

It may not seems much for one port, but when you have 30k+ ports doing
that for many files, it adds up.

-- 
Mathieu Arnold