On Thu, Feb 25, 2021 at 08:15:46AM -0600, Matthew Martin wrote:
> On Thu, Feb 25, 2021 at 10:16:03AM +0000, Mikolaj Kucharski wrote:
> > On Thu, Feb 25, 2021 at 11:04:06AM +0100, Marc Espie wrote:
> > > On Thu, Feb 25, 2021 at 09:53:04AM +0100, Marc Espie wrote:
> > > > next time, please remember to build it.
> > > > there's a reason do-build checks the syntax of those perl files.
> > >
> > > morning brainfart, of course it built. Which begs the question how come
> > > the
> > > syntax check didn't get it
> > >
> >
> > $ find files/ -type f -name \*.pm -print -exec /usr/bin/false \;
> > files/Quirks.pm
> > files/Quirks/ghc.pm
> >
> > $ echo $?
> > 0
>
> A non-zero exit for -exec ...\; is not propagated to find's exit status
> as it's just a filter. A non-zero exit for -exec ...+ is however.
> Since perl -c doesn't seem to support checking multiple files at once,
> a simple s/\\;/+/ doesn't work, but this does.
>
>
> diff --git Makefile Makefile
> index 02d43cc077f..d4ef43c0b39 100644
> --- Makefile
> +++ Makefile
> @@ -15,7 +15,7 @@ PERMIT_PACKAGE = Yes
> PERLDIR = ${PREFIX}/libdata/perl5/site_perl
>
> do-build:
> - @find ${FILESDIR} -type f -name \*.pm -exec perl -c {} \;
> + @find ${FILESDIR} -type f -name \*.pm ! -exec perl -c {} \; -exec false
> {} +
>
> do-install:
> ${INSTALL_DATA_DIR} ${PERLDIR}/OpenBSD/Quirks
>
>
Yeah, well, sthen@ fixed it in between, in a way among several possible fixes.