summaryrefslogtreecommitdiff
path: root/dev-util/pkgcheck
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-17 00:25:50 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-17 00:25:50 +0000
commit48dbe17904ac8ee6f006488d8f21734b0d253db4 (patch)
tree90c7f087cbefd4ac6b893072d309e75dbf019f76 /dev-util/pkgcheck
parent7972abc05090180dcc09d2b16af4020ce1cd1841 (diff)
gentoo auto-resync : 17:03:2023 - 00:25:50
Diffstat (limited to 'dev-util/pkgcheck')
-rw-r--r--dev-util/pkgcheck/Manifest3
-rw-r--r--dev-util/pkgcheck/files/pkgcheck-0.10.19-fix-pkgcore-0.12.18.patch65
-rw-r--r--dev-util/pkgcheck/files/pkgcheck-0.10.19-fix-setup.patch22
-rw-r--r--dev-util/pkgcheck/files/pkgcheck-0.10.20-fix-replay-bin.patch109
4 files changed, 0 insertions, 199 deletions
diff --git a/dev-util/pkgcheck/Manifest b/dev-util/pkgcheck/Manifest
index d89e45dd487f..11dc5a71c726 100644
--- a/dev-util/pkgcheck/Manifest
+++ b/dev-util/pkgcheck/Manifest
@@ -1,7 +1,4 @@
AUX 50pkgcheck-gentoo.el 125 BLAKE2B db546b7f4e1517fb4f3bc46eff6a3294c8d677be031ecb33987daa84c355c3628ab7f24bbab90afb24b0bcec6c0ebebb56339374fa35a345481aa9808bd538be SHA512 31bad085867ebecedf0c9c3ed1223e7512238892d69b5224e850d744c5965bf7a2d7cb90978d9cce6da8dc554dba36803d604b8c6ac2b7cc9f2718ef7d6fc644
-AUX pkgcheck-0.10.19-fix-pkgcore-0.12.18.patch 2435 BLAKE2B 3e41b3ca1666aa8f88473bb3586312d77dfe2dee6748355346ef774dd8ddea4680abc329c653679eb97e634d86e63ef7c0b1593c9aa7ff4160ebf1e5d072519e SHA512 33607bcf237a542d043255f7a9f7f421f87d1a9e782a3f9a23cefaa91ea0fdfe815f50ff44125cd4e7c54aae36a6503998b9eb3c8c49e3626b46a1845ea39120
-AUX pkgcheck-0.10.19-fix-setup.patch 733 BLAKE2B 39033cf4509d7a46f0a638109cf1b7b8cb8b978f6b50ab4a331ee0b73745d3706b22f8e331990a2daf7138a9d0a37f42dcccb03285ea705ef96e2ae4d3a79f6d SHA512 6f1e2644989d2843fa9358e3bb440306fa4b6f52bece07dd2bec36b2597b41c03d54784d3ea505539ab5463030703d4b76d62ea476fb31d0f5719a6af662affa
-AUX pkgcheck-0.10.20-fix-replay-bin.patch 4506 BLAKE2B 68262310538abb220ef3f3109f65656e11716160895491f00f438bd686fe6a904238b1dd29cd92db7bbbb83f2a0282e455e843b7cc8f17c9f4c47a42f8dc4a82 SHA512 42a45d64f4bcd31b510124e8091bb3aae93c906bdb90ea2332405a5b17baee43edffc45563774fbdb2a7efae795065b67f81aeef1c5b9bde7df0bdcdeab3aa48
AUX pkgcheck-0.10.21-fix-scm.patch 1470 BLAKE2B 2ca07fd6f5736df1bc8ce374842bc5d8090e7e705bf0c98630ab94e9c12ca2f0cd0be6b9bd57d59e67f2b25f971865ff3583d66f2815762e68943083636656f7 SHA512 360091ce895ded5abec23cfe7b9d268d22ae59a237c2f9f85e5463488d94dd8fa86eb8e7b148d0d92066d69854d263dd08645620bc43aedabdd8a283adbbd8d2
DIST pkgcheck-0.10.22.tar.gz 566826 BLAKE2B 714eb92bd43b4c3f2319aecb343fe6580f754ba50ed6fa986faaedcba71d34f2834ca85d17c961d327c90081dc305febccfbe08dbc13a706d972e289271214e3 SHA512 45532faa169d42f3d5a94a17e83089d4789e7c3e26226f2e5441ba8816cd3610a9025cc392bb32d6d78f202354ab11117fbd07ec2550d7e3255c02c6cb96d98e
DIST pkgcheck-0.10.23.tar.gz 568903 BLAKE2B 8b00dc93d0c3f597f7397d2e7b3686d11b12da715d6e8071f1b02a8085061cbb2d7cb24bde6a73ef6e5d1459637cb78e536ce80a162f188a42739a434c62c397 SHA512 3bcdb91bf73cde60fd9fc2f5e470c5ccdfd7b3564e83192201b0fa1dc38265e1e0c7f7052039accbb62c55d816a6e89317d7d388c0cc3da3b4836475cb82bd03
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