Date: Thu, 17 Aug 2023 17:14:03 +0900 From: Tatsuki Makino <tatsuki_makino@hotmail.com> To: ports@freebsd.org Subject: Re: plist-check not reporting orphaned files present in a @comment Message-ID: <SI2PR01MB5036417FFC955DC05AAB95D3FA1AA@SI2PR01MB5036.apcprd01.prod.exchangelabs.com> In-Reply-To: <yccoastr67igymrpia64kkxofded42fzrcboc4fmvwbn4uop4f@ug5j362pkjgr> References: <5h3c6jbzs7y5k3hyimqn7jkyo3se3txvcywahpcffzc24hjew7@kx4mhnqq7gh4> <8raa-vofq-wny@FreeBSD.org> <2ppfted4t72jo2bhgxfmoghpm6zukhrcqevucxvouqqwehwugg@zy4chydjtuxy> <67hyj5pbnd2hf66tdj2szrtyhxozmjjcevw5rooas2vzrltxna@oqjzi7m5tfho> <SI2PR01MB50367346DECCA8B8A4FC29FDFA15A@SI2PR01MB5036.apcprd01.prod.exchangelabs.com> <yccoastr67igymrpia64kkxofded42fzrcboc4fmvwbn4uop4f@ug5j362pkjgr>
next in thread | previous in thread | raw e-mail | index | archive | help
Felix Palmen wrote on 2023/08/17 15:03: > * Tatsuki Makino <tatsuki_makino@hotmail.com> [20230817 07:57]: >> Switching @comment by ${ARCH} is also in print/epson-inkjet-printer-escpr2. >> This is not a problem with check-orphans. > > It is, when some file doesn't exist for all architectures, but for more > than one of them. > > You first test the port on ARCH=foo. Then you test on ARCH=bar and find > that it builds/installs an additional tmp/something, so you prefix it > with %%BAR%% which expands to "@comment " unless building on ARCH=bar. > > Then you test on ARCH=baz which happens to build/install the same > tmp/something. plist-check will still be happy because the file is there > in pkg-plist (ignoring the @comment). Still, the file will be missing > from the package. > > I might try another workaround, e.g. expand to "@comment dummy/" > instead, so the name won't match and plist-check will complain ... epson-inkjet-printer-escpr2 is easy because it is restricted to 2 architectures, but in general it seems difficult. How about also making a combined PLIST_SUB in Makefile? .if ${ARCH} == foo PLIST_SUB+= FOO="" \ BAR="@comment " \ FOO_and_BAR="" .elif ${ARCH} == bar PLIST_SUB+= FOO="@comment " \ BAR="" \ FOO_and_BAR="" .else PLIST_SUB+= FOO_and_BAR="@comment " .endif And on pkg-plist side... %%FOO_and_BAR%%tmp/something There is one more thing that seems to be possible with pkg-plist. %%FOO%%%%BAR%%tmp/something If this means FOO && BAR, %%FOO%%tmp/something %%BAR%%tmp/something this would mean FOO || BAR. However, I do not know if it is allowed to write the same file name more than once, so it is time for an explanation by a great person :) According to Mk/Scripts/check-stagedir.sh, it only deletes lines with @comment at the beginning of the line, so there seems to be no problem... Regards.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?SI2PR01MB5036417FFC955DC05AAB95D3FA1AA>