pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: abysmal check-portability speed



* On 2024-09-23 at 16:44 BST, Greg Troxel wrote:

Jonathan Perkin <jperkin%mnx.io@localhost> writes:

You might find this patch helps:

  https://github.com/TritonDataCenter/pkgsrc/commit/21aa3cb38903181f291ceb5ccb0245af12fe7a00

Thanks - that is a huge clue to what's going on.

It seems that NetBSD's /bin/sh does not support read -n.

For the interest of others, I've pushed a commit to mktool to add a check-portability replacement. As expected it's significantly faster (~16x, 3.3s vs 52.1s), testing in x11/qt5-qtwebengine:

  https://github.com/jperkin/mktool/commit/fdcebff821943bc8500eaccb635da62dc9d85b0e

While developing this I realised that the "read -n" patch is harmful, at least with certain shells:

  $ printf "foo\nbar\n" | bash -c 'read -n 128 foo; echo $foo'
  foo

  $ printf "foo\nbar\n" | mksh -c 'read -n 128 foo; echo $foo'
  foo bar

This actually breaks the tests completely when using mksh, as it no longer matches "#!*/bin/sh" as the first line. So, something to watch out for.

mktool users: if you're able to give that patch a spin and let me know how it goes I'd appreciate it. I will get a new version in after the freeze.

--
Jonathan Perkin   -   mnx.io   -   pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


Home | Main Index | Thread Index | Old Index