As shown by the example below, check-plist target does not respect @comment statements in pkg-plist: @comment'ed @dir which is invisible to pkg, is though treated by check plist as regular @dir. % cat Makefile PORTNAME= testport PORTVERSION= 0.0.0 CATEGORIES= sysutils DISTFILES= # MAINTAINER= amdmi3@FreeBSD.org COMMENT= # NO_BUILD= yes do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/testdir .include <bsd.port.mk> % cat pkg-plist % sudo make clean stage check-plist 2>&1 | grep -A1 "Checking for items in STAGEDIR" ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: @dir testdir % echo "@dir testdir" > pkg-plist % sudo make clean stage check-plist 2>&1 | gerp -A1 "Checking for items in STAGEDIR" ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for items in pkg-plist which are not in STAGEDIR % echo "@comment @dir testdir" > pkg-plist % sudo make clean stage check-plist 2>&1 | gerp -A1 "Checking for items in STAGEDIR" ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for items in pkg-plist which are not in STAGEDIR % echo -n > pkg-plist % sudo make clean stage check-plist 2>&1 | gerp -A1 "Checking for items in STAGEDIR" ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: @dir testdir
Yes, you can use @comment to whitelist orphans, this is a feature not a bug
This is bug as it changes meaning of @comment. There should be another directive with clear meaning like @ignore, while @comment should do what it means - make an entry invisible to anything what parses plist.
I don't think this can be closed while the problem remains. I at least demand a comment.
Well, antoine already said that, but... It works as intended, if you have "@comment file" and that "file" is here, it is ignored. If you want to work on a different implementation, please do so, provide a patch, and open a PR about it. But I repeat, @comment works as intended.