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

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 16 Aug 2023 18:20:57 UTC
Felix Palmen <zirias@freebsd.org> writes:

> Hi all,
>
> I'm having unexpected trouble with plist-check. I have some custom
> PLIST_SUB expanding to "@comment " based on ${ARCH} and found that
> orphaned files from ${STAGEDIR} weren't properly reported.
>
> Then I tried to hardcode "@comment " in pkg-plist instead (to rule out
> possible issues with expansion) and they *still* were not reported,
> which seems very strange. Only when I removed the lines completely,
> plist-check correctly reported the orphaned files.

Looks intentional per https://cgit.freebsd.org/ports/commit/?id=e15449a9eff5

>    - Fix showing files installed through unselected OPTIONS as orphans,
>      by considering "@comment file" to be ignored. [2]
[...]
> [2] This is a partial solution, we may still need a plist.ignore too. It
>     doesn't make much sense to add files in main pkg-plist we don't care about,
>     but maybe it does since you'll see and reconsider them being ignored
>     someday. @comment is used as all the OPTION PLIST_SUB deactivations use
>     @comment instead of something like @ignore.