diff options
3 files changed, 0 insertions, 196 deletions
diff --git a/dev-util/pkgcheck/files/pkgcheck-0.10.19-fix-pkgcore-0.12.18.patch b/dev-util/pkgcheck/files/pkgcheck-0.10.19-fix-pkgcore-0.12.18.patch deleted file mode 100644 index c2c452c42c7f..000000000000 --- a/dev-util/pkgcheck/files/pkgcheck-0.10.19-fix-pkgcore-0.12.18.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -8,8 +8,8 @@ requires = [ - "lxml", - "pathspec", - "tree-sitter>=0.19.0", -- "snakeoil~=0.10.3", -- "pkgcore~=0.12.17", -+ "snakeoil~=0.10.4", -+ "pkgcore~=0.12.18", - ] - build-backend = "setuptools.build_meta" - -@@ -40,8 +40,8 @@ dependencies = [ - "lxml", - "pathspec", - "tree-sitter>=0.19.0", -- "snakeoil~=0.10.3", -- "pkgcore~=0.12.17", -+ "snakeoil~=0.10.4", -+ "pkgcore~=0.12.18", - ] - - [project.optional-dependencies] -@@ -53,7 +53,7 @@ test = [ - doc = [ - "sphinx", - "tomli; python_version < '3.11'", -- "snakeoil~=0.10.3", -+ "snakeoil~=0.10.4", - ] - network = [ - "requests", ---- a/src/pkgcheck/checks/metadata.py -+++ b/src/pkgcheck/checks/metadata.py -@@ -210,11 +210,10 @@ class IuseCheck(Check): - def __init__(self, *args, use_addon): - super().__init__(*args) - self.iuse_handler = use_addon -- self.valid_use = atom_mod.valid_use_flag.match - self.bad_defaults = tuple(['-'] + [f'+{x}_' for x in self.use_expand_groups]) - - def feed(self, pkg): -- if invalid := sorted(x for x in pkg.iuse_stripped if not self.valid_use(x)): -+ if invalid := sorted(x for x in pkg.iuse_stripped if not pkg.eapi.is_valid_use_flag(x)): - yield InvalidUseFlags(invalid, pkg=pkg) - - if pkg.eapi.options.iuse_defaults and (bad_defaults := sorted( ---- a/testdata/data/repos/standalone/SourcingCheck/InvalidEapi/expected.json -+++ b/testdata/data/repos/standalone/SourcingCheck/InvalidEapi/expected.json -@@ -1,2 +1,2 @@ - {"__class__": "InvalidEapi", "category": "SourcingCheck", "package": "InvalidEapi", "version": "0", "attr": "eapi", "msg": "EAPI '9999' is not supported"} --{"__class__": "InvalidEapi", "category": "SourcingCheck", "package": "InvalidEapi", "version": "1", "attr": "eapi", "msg": "invalid EAPI: 'invalid!'"} -+{"__class__": "InvalidEapi", "category": "SourcingCheck", "package": "InvalidEapi", "version": "1", "attr": "eapi", "msg": "invalid EAPI 'invalid!'"} ---- a/tests/checks/test_metadata.py -+++ b/tests/checks/test_metadata.py -@@ -430,7 +430,7 @@ class TestSourcingCheck(misc.ReportTestCase, misc.Tmpdir): - """)) - r = self.assertReport(check, self.repo) - assert isinstance(r, metadata.InvalidEapi) -- assert f"invalid EAPI: '{eapi}'" in str(r) -+ assert f"invalid EAPI '{eapi}'" in str(r) - - def test_sourcing_error(self): - check = self.mk_check() diff --git a/dev-util/pkgcheck/files/pkgcheck-0.10.19-fix-setup.patch b/dev-util/pkgcheck/files/pkgcheck-0.10.19-fix-setup.patch deleted file mode 100644 index 8366e435a1e9..000000000000 --- a/dev-util/pkgcheck/files/pkgcheck-0.10.19-fix-setup.patch +++ /dev/null @@ -1,22 +0,0 @@ -https://github.com/pkgcore/pkgcheck/commit/b4c34a95f4c66db9c658f6dd75d9193c6e55dab4 - ---- a/setup.py -+++ b/setup.py -@@ -36,12 +36,12 @@ class build_treesitter(Command, SubCommand): - pass - - def get_source_files(self): -- cwd = Path(__file__).parent / "tree-sitter-bash/src" -+ src = "tree-sitter-bash/src/" - return [ -- str(cwd / "GNUmakefile"), -- str(cwd / "tree_sitter/parser.h"), -- str(cwd / "parser.c"), -- str(cwd / "scanner.cc"), -+ src + "GNUmakefile", -+ src + "tree_sitter/parser.h", -+ src + "parser.c", -+ src + "scanner.cc", - ] - - library_path = Path(__file__).parent / "src/pkgcheck/bash/lang.so" diff --git a/dev-util/pkgcheck/files/pkgcheck-0.10.20-fix-replay-bin.patch b/dev-util/pkgcheck/files/pkgcheck-0.10.20-fix-replay-bin.patch deleted file mode 100644 index e20c0b3f53f5..000000000000 --- a/dev-util/pkgcheck/files/pkgcheck-0.10.20-fix-replay-bin.patch +++ /dev/null @@ -1,109 +0,0 @@ -test_pkgcheck_replay: fix test_replay_pipe_stdin from sdist - -Bug: https://bugs.gentoo.org/888896 -Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org> ---- a/tests/scripts/test_pkgcheck_replay.py -+++ b/tests/scripts/test_pkgcheck_replay.py -@@ -1,20 +1,18 @@ --import os --import subprocess - import tempfile - from functools import partial - from unittest.mock import patch - - import pytest -+from snakeoil.formatters import PlainTextFormatter -+ - from pkgcheck import __title__ as project - from pkgcheck.checks.profiles import ProfileWarning - from pkgcheck.reporters import JsonStream - from pkgcheck.scripts import run --from snakeoil.formatters import PlainTextFormatter - - - class TestPkgcheckReplay: -- -- script = partial(run, project) -+ script = staticmethod(partial(run, project)) - - @pytest.fixture(autouse=True) - def _setup(self, testconfig): -@@ -33,11 +31,11 @@ class TestPkgcheckReplay: - - def test_replay(self, capsys): - result = ProfileWarning("profile warning: foo") -- with tempfile.NamedTemporaryFile() as f: -- out = PlainTextFormatter(f) -+ with tempfile.NamedTemporaryFile() as file: -+ out = PlainTextFormatter(file) - with JsonStream(out) as reporter: - reporter.report(result) -- with patch("sys.argv", self.args + ["-R", "StrReporter", f.name]): -+ with patch("sys.argv", self.args + ["-R", "StrReporter", file.name]): - with pytest.raises(SystemExit) as excinfo: - self.script() - out, err = capsys.readouterr() -@@ -47,13 +45,13 @@ class TestPkgcheckReplay: - - def test_corrupted_resuts(self, capsys): - result = ProfileWarning("profile warning: foo") -- with tempfile.NamedTemporaryFile() as f: -- out = PlainTextFormatter(f) -+ with tempfile.NamedTemporaryFile() as file: -+ out = PlainTextFormatter(file) - with JsonStream(out) as reporter: - reporter.report(result) -- f.write(b"corrupted") -- f.seek(0) -- with patch("sys.argv", self.args + ["-R", "StrReporter", f.name]): -+ file.write(b"corrupted") -+ file.seek(0) -+ with patch("sys.argv", self.args + ["-R", "StrReporter", file.name]): - with pytest.raises(SystemExit) as excinfo: - self.script() - out, err = capsys.readouterr() -@@ -61,26 +59,28 @@ class TestPkgcheckReplay: - assert excinfo.value.code == 2 - - def test_invalid_file(self, capsys): -- with tempfile.NamedTemporaryFile(mode="wt") as f: -- f.write("invalid file") -- f.seek(0) -- with patch("sys.argv", self.args + ["-R", "StrReporter", f.name]): -+ with tempfile.NamedTemporaryFile(mode="wt") as file: -+ file.write("invalid file") -+ file.seek(0) -+ with patch("sys.argv", self.args + ["-R", "StrReporter", file.name]): - with pytest.raises(SystemExit) as excinfo: - self.script() - out, err = capsys.readouterr() - assert err.strip() == "pkgcheck replay: error: invalid or unsupported replay file" - assert excinfo.value.code == 2 - -- def test_replay_pipe_stdin(self): -- script = pytest.REPO_ROOT / "bin/pkgcheck" -- result = ProfileWarning("profile warning: foo") -- with tempfile.NamedTemporaryFile() as f: -- out = PlainTextFormatter(f) -+ def test_replay_pipe_stdin(self, capsys): -+ with tempfile.NamedTemporaryFile() as file: -+ out = PlainTextFormatter(file) - with JsonStream(out) as reporter: -- reporter.report(result) -- f.seek(0) -- p = subprocess.run( -- [script, "replay", "-R", "StrReporter", "-"], stdin=f, stdout=subprocess.PIPE -- ) -- assert p.stdout.decode() == "profile warning: foo\n" -- assert p.returncode == 0 -+ reporter.report(ProfileWarning("profile warning: foo")) -+ file.seek(0) -+ -+ with open(file.name) as stdin, patch("sys.stdin", stdin), patch( -+ "sys.argv", [*self.args, "-R", "StrReporter", "-"] -+ ), pytest.raises(SystemExit) as excinfo: -+ self.script() -+ out, err = capsys.readouterr() -+ assert not err -+ assert out == "profile warning: foo\n" -+ assert excinfo.value.code == 0 |