Re: quirks botched commit
On Thu, Feb 25, 2021 at 08:15:46AM -0600, Matthew Martin wrote: > On Thu, Feb 25, 2021 at 10:16:03AM +, 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.
Re: quirks botched commit
On Thu, Feb 25, 2021 at 10:16:03AM +, 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
Re: quirks botched commit
On Thu, Feb 25, 2021 at 10:16:03AM +, 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 > Below gives expected result of failure. $ find files/ -type f -name \*.pm -print0 | xargs -r0t -I% perl -c % perl -c files/Quirks/ghc.pm files/Quirks/ghc.pm syntax OK perl -c files/Quirks.pm String found where operator expected at files/Quirks.pm line 2196, near ""Upstrem moved to unversioned tarballs, use the plan9port (same upstream) package instead"" (Missing semicolon on previous line?) syntax error at files/Quirks.pm line 2196, near ""Upstrem moved to unversioned tarballs, use the plan9port (same upstream) package instead"" files/Quirks.pm had compilation errors. xargs: perl exited with status 255 $ echo $? 124 -- Regards, Mikolaj
Re: quirks botched commit
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 -- Regards, Mikolaj
Re: quirks botched commit
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
quirks botched commit
next time, please remember to build it. there's a reason do-build checks the syntax of those perl files.