diff --git a/srcpkgs/yq/patches/958eb4f0d7f2f7bfcbae87e1f4202ba52439f1d7.diff b/srcpkgs/yq/patches/958eb4f0d7f2f7bfcbae87e1f4202ba52439f1d7.diff new file mode 100644 index 00000000000..5860e5f42d7 --- /dev/null +++ b/srcpkgs/yq/patches/958eb4f0d7f2f7bfcbae87e1f4202ba52439f1d7.diff @@ -0,0 +1,31 @@ +diff --git a/test/test.py b/test/test.py +index 9d06314..04fa59f 100755 +--- test/test.py ++++ test/test.py +@@ -3,12 +3,13 @@ + + from __future__ import absolute_import, division, print_function, unicode_literals + +-import os, sys, unittest, tempfile, json, io ++import os, sys, unittest, tempfile, json, io, platform + + sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) + from yq import main # noqa + + USING_PYTHON2 = True if sys.version_info < (3, 0) else False ++USING_PYPY = True if platform.python_implementation() == "PyPy" else False + + class TestYq(unittest.TestCase): + def run_yq(self, input_data, args, expect_exit_code=os.EX_OK): +@@ -45,7 +46,9 @@ def test_yq_arg_passthrough(self): + self.assertEqual(self.run_yq("{}", ["--arg", "foo", "bar", "--arg", "x", "y", "--indent", "4", "."]), "") + self.assertEqual(self.run_yq("{}", ["--arg", "foo", "bar", "--arg", "x", "y", "-y", "--indent", "4", ".x=$x"]), + "x: y\n") +- self.run_yq("{}", ["--indent", "9", "."], expect_exit_code=2) ++ err = "yq: Error running jq: {}Error: [Errno 32] Broken pipe{}".format("IO" if USING_PYTHON2 else "BrokenPipe", ++ ": ''." if USING_PYPY else ".") ++ self.run_yq("{}", ["--indent", "9", "."], expect_exit_code=err) + + def fd_path(self, fh): + return "/dev/fd/{}".format(fh.fileno()) + diff --git a/srcpkgs/yq/template b/srcpkgs/yq/template index 351dc6edcfa..2cd293d0eb7 100644 --- a/srcpkgs/yq/template +++ b/srcpkgs/yq/template @@ -1,6 +1,6 @@ # Template file for 'yq' pkgname=yq -version=2.3.4 +version=2.3.6 revision=1 noarch=yes build_style=python3-module @@ -13,7 +13,7 @@ maintainer="maxice8 " license="Apache-2.0" homepage="https://github.com/kislyuk/yq" distfiles="${PYPI_SITE}/y/yq/yq-${version}.tar.gz" -checksum=e8a83765b8ac22479f83db80d161f1d9834c6e6bd07916a339a1221b2bcd9311 +checksum=795f79b39e45c26396db73f14c2ab42ae172be6bed95e19b30483f2d34fc425b do_check() { python3 test/test.py