summaryrefslogtreecommitdiff
path: root/dev-util/pkgcheck
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-11 19:55:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-11 19:55:43 +0100
commit185fa19bbf68a4d4dca534d2b46729207a177f16 (patch)
treea8a537b82fda83a0799c2ca9887f212558363aa7 /dev-util/pkgcheck
parentc8fd0d84af0bfd1949542adc2cbb735b1d28f9ed (diff)
gentoo resync : 11.05.2021
Diffstat (limited to 'dev-util/pkgcheck')
-rw-r--r--dev-util/pkgcheck/Manifest4
-rw-r--r--dev-util/pkgcheck/files/pkgcheck-0.9.7-py310-update.patch170
-rw-r--r--dev-util/pkgcheck/pkgcheck-0.9.7-r1.ebuild63
-rw-r--r--dev-util/pkgcheck/pkgcheck-9999.ebuild4
4 files changed, 240 insertions, 1 deletions
diff --git a/dev-util/pkgcheck/Manifest b/dev-util/pkgcheck/Manifest
index 485784117d41..184f0116abf8 100644
--- a/dev-util/pkgcheck/Manifest
+++ b/dev-util/pkgcheck/Manifest
@@ -1,3 +1,4 @@
+AUX pkgcheck-0.9.7-py310-update.patch 7845 BLAKE2B c530448d0019af7ba7d2f3866ed4a8d12fc84a4dfd7fdf7260fe8d84fe4f9539e116c60190bff80b518abcc6c8dfeeda2a7c46c74b1d4b999a4b4fb81efdf6e7 SHA512 e976a8cab6196b738073491b407a431611fda0bfe0c6202a3b799c8608a6404b9d607c1d4b472e051ebee23f7fc1b97caad31ef7f80144bd1280ebf2562e173b
DIST pkgcheck-0.8.2.tar.gz 455039 BLAKE2B 282c75578cd4aa7aca3f54e9625360cde4d7146cc08a6b2bcf2f594b21b6224a18e0623055e8aa866e89583b9fd6ec12749aa4bba791f06a851b1b43fe60d440 SHA512 3377060dae6e2c49d5ae6f2dbb883da4ddeab35ecd04133635f3a91f5bfb63177497b8843445914132539efc461ce0ea89bd5d07d3cba49e0854b91d7e2f74ce
DIST pkgcheck-0.9.3.tar.gz 460029 BLAKE2B 3ef3aa6c338c5b379e4845302aaaacc5c71679309f45985e1dfa71fb1e62760c4f94ca43d34ca4ad75ecd1f738d9bcb0140568b4e4826ee6a14586c21d0c1a03 SHA512 5613f65437e6cc1c55330eef8bc354ad2f6e325a03c8353186d17a8e9dd21333a3900f91a36c1af0767ccda56f30d425ddb848e4eccf9d20ccba3f5de5098fb3
DIST pkgcheck-0.9.5.tar.gz 459226 BLAKE2B 23f42ffb49bb89b33d01749fede01a8399c99a8e400bd451d1577c4240b929913b13738ba5bc55f3251058e26bebb619bedfb2ec1a50733a1bd8a7c62c7602df SHA512 2a404657e9b6d48d7f99d743aaee6bd4d5aee9cb48c28f89fea46cc7c680e6d3c0351660632abcf879c5ca3569b47cb22c7d6a53ba17d60fe6b545b3c96b90e7
@@ -5,6 +6,7 @@ DIST pkgcheck-0.9.7.tar.gz 453478 BLAKE2B 486bae68af1757fbdb4b109b34cea836cb6dee
EBUILD pkgcheck-0.8.2-r2.ebuild 1417 BLAKE2B 0b635b4a66c79928fd2ae21de749e456686dcd77d66e7fb413c39c0b645c3252c4eab7d77f1725b038fdcdd84d25998dcb79b9ee1a0c80b6063510d49d9f15a5 SHA512 3ef8917647484400d8a46e2942e598769e01918f381117877815535ed0dc6e683640ef49dc4cec2f5182d80c2ef06184ce823f9beb6ecc9203490a907db813e1
EBUILD pkgcheck-0.9.3-r1.ebuild 1544 BLAKE2B f8d9c073beafcbedea2058b26420130fe065a25d57524de80caa310b03570a3ad52e6109666a4e008fc87868a708c9510164304880f5e086d14a8b6a9e06ebcf SHA512 a49b1d8d5eabd1139ef081bf374fb36fb0b6e724eac57644cf72c976271878941340774d7e8aea77ece8d185315d38f8cbe359fbc4187be67296ee09b9ab4ee4
EBUILD pkgcheck-0.9.5.ebuild 1507 BLAKE2B ed58c351d977d491d464d896a8519d88ed1799d7bfada82c2588249ff4245b5efcb65a2df38fb3a620f5573d0fc542ee7347338c8bd58fcba22118e1f0106f0b SHA512 dff66a95a5c5ec85d886f58674b6b9bc945f2664c666105b2e8e4989a2cddcd324578ca1abcbfbd56bfd98eabc99abd222662882163a5b51d3813e8b899f1279
+EBUILD pkgcheck-0.9.7-r1.ebuild 1559 BLAKE2B 3a027528217f62b4f793f616c2d1f562ffc0a991fad0640ab136245ba86e65a000fea4e0d5c6197b3dce4b2b17063d04fa7e0ebed850cefcd99f049a806d99da SHA512 a10e103e418e85453ba40e90203e8aeaad464cd90950fce4c74532496958a02ea9f7f8f2a65ba80da72ae12b1053385d93a501b6540fab507dfb0f3eb2d8f05b
EBUILD pkgcheck-0.9.7.ebuild 1499 BLAKE2B d902ae79522cd7d08274fc82cf0954557a02ddfcef87f023ea3905ded88b44dc1e651e7cb38b89438532f6f09a3644cd0663e085852161f9cd404cba27e5aea9 SHA512 b506c1d78a8857b3e8a4b36663126b613622cad2ba8f4b15b49a0744412428eb8dd495f57f5d8eedae0c2a400dcf5b4decd72b987d44e8c47116539b240ae3c1
-EBUILD pkgcheck-9999.ebuild 1507 BLAKE2B 195770c065ba7471492ea94d35e9cabf658921cfca255543354f96f4112bd12958d2d445f99e60c5ab71beec94e2dbd98c13f6837d67bede0ad46547a29d1b92 SHA512 ec29615b0f6c41dddc72c6ced8c3edc6e68efb093122ff4896b685189b7676a12d997fac0645ad993ebd79ca14cf285eb063275e1cc0f3297b90acf0a5f6dad2
+EBUILD pkgcheck-9999.ebuild 1566 BLAKE2B 6bb5d7ffc6d1f63444eb574b6a230d187a177593087af1c777c52a8829b19477a7afa570fda4c45f9904d8e5ffc81061ee78eeefbcfcd77a8848eb3212fc58b1 SHA512 c1ac0651030a9d7a503e361fb99031ea3f8aac891696326048a011d299764f27a8ebff9f5e7825f83aa06e2da958191346815162044e973d0418b3a2bf5391dc
MISC metadata.xml 328 BLAKE2B b84dba717460e84f7ee3163fd8d6a5f13eb3b15dd1bb749f6ece81f062e3530988dacefadb24c1395eb36593a7ab6d868b06c8c4ee8f620a17c85faf04283b24 SHA512 5696505214a737ad495b23bfac2a51fbbc5b1e815eb6fcbabb3c6674325f05e3f6f418de05257c08935e389e47879e8a2d1b3723ec86aeb5ad97c6110fd2ec75
diff --git a/dev-util/pkgcheck/files/pkgcheck-0.9.7-py310-update.patch b/dev-util/pkgcheck/files/pkgcheck-0.9.7-py310-update.patch
new file mode 100644
index 000000000000..8bee592b228e
--- /dev/null
+++ b/dev-util/pkgcheck/files/pkgcheck-0.9.7-py310-update.patch
@@ -0,0 +1,170 @@
+From 443c0aab158e34196399073e801ae19ae0dce4dc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 9 May 2021 10:59:18 +0200
+Subject: [PATCH] python: Fix treating python3.10 as newer than python3.9
+
+Fix the sorting logic to use a combined lexical-numerical sort, in order
+to sort python3.10 as newer than python3.9. This fixes
+PythonCompatUpdate check.
+---
+ src/pkgcheck/checks/python.py | 25 +++++++++++++++----
+ .../PythonCompatUpdate/expected.json | 6 ++---
+ .../PythonCompatUpdate/fix.patch | 6 ++---
+ .../profiles/desc/python_single_target.desc | 1 +
+ .../python/profiles/desc/python_targets.desc | 1 +
+ .../stub/python-dep1/python-dep1-0.ebuild | 2 +-
+ .../stub/python-dep2/python-dep2-0.ebuild | 2 +-
+ 7 files changed, 30 insertions(+), 13 deletions(-)
+
+diff --git a/src/pkgcheck/checks/python.py b/src/pkgcheck/checks/python.py
+index ed922215..7f0e9be4 100644
+--- a/src/pkgcheck/checks/python.py
++++ b/src/pkgcheck/checks/python.py
+@@ -1,4 +1,5 @@
+ import itertools
++import re
+
+ from pkgcore.ebuild.atom import atom
+ from pkgcore.restrictions import packages, values
+@@ -28,6 +29,18 @@ CHECK_EXCLUDE = frozenset(['virtual/pypy', 'virtual/pypy3'])
+ IUSE_PREFIX = 'python_targets_'
+ IUSE_PREFIX_S = 'python_single_target_'
+
++TARGET_SPLIT_RE = re.compile(r'([0-9]+)')
++
++
++def target_sort_key(target):
++ def iter():
++ for x in TARGET_SPLIT_RE.split(target):
++ try:
++ yield int(x)
++ except ValueError:
++ yield x
++ return tuple(iter())
++
+
+ def get_python_eclass(pkg):
+ eclasses = ECLASSES.intersection(pkg.inherited)
+@@ -281,14 +294,14 @@ class PythonCompatCheck(Check):
+ for target, _desc in repo.config.use_expand_desc.get(IUSE_PREFIX[:-1], ()):
+ if target[len(IUSE_PREFIX):].startswith('python'):
+ targets.append(target[len(IUSE_PREFIX):])
+- multi_targets = tuple(sorted(targets))
++ multi_targets = tuple(sorted(targets, key=target_sort_key))
+
+ # determine available PYTHON_SINGLE_TARGET use flags
+ targets = []
+ for target, _desc in repo.config.use_expand_desc.get(IUSE_PREFIX_S[:-1], ()):
+ if target[len(IUSE_PREFIX_S):].startswith('python'):
+ targets.append(target[len(IUSE_PREFIX_S):])
+- single_targets = tuple(sorted(targets))
++ single_targets = tuple(sorted(targets, key=target_sort_key))
+
+ self.params = {
+ 'python-r1': (multi_targets, IUSE_PREFIX, None),
+@@ -327,8 +340,9 @@ class PythonCompatCheck(Check):
+ try:
+ # determine the latest supported python version
+ latest_target = sorted(
+- f"python{x.slot.replace('.', '_')}" for x in deps
+- if x.key == 'dev-lang/python' and x.slot is not None)[-1]
++ (f"python{x.slot.replace('.', '_')}" for x in deps
++ if x.key == 'dev-lang/python' and x.slot is not None),
++ key=target_sort_key)[-1]
+ except IndexError:
+ # should be flagged by PythonMissingDeps
+ return
+@@ -355,4 +369,5 @@ class PythonCompatCheck(Check):
+ except IndexError:
+ return
+
+- yield PythonCompatUpdate(sorted(targets), pkg=pkg)
++ yield PythonCompatUpdate(sorted(targets, key=target_sort_key),
++ pkg=pkg)
+diff --git a/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/expected.json b/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/expected.json
+index ab7d9b01..f3476eac 100644
+--- a/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/expected.json
++++ b/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/expected.json
+@@ -1,3 +1,3 @@
+-{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "0", "updates": ["python3_8", "python3_9"]}
+-{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "1", "updates": ["python3_9"]}
+-{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "2", "updates": ["python3_9"]}
++{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "0", "updates": ["python3_8", "python3_9", "python3_10"]}
++{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "1", "updates": ["python3_9", "python3_10"]}
++{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "2", "updates": ["python3_9", "python3_10"]}
+diff --git a/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/fix.patch b/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/fix.patch
+index c63184e9..9be4952a 100644
+--- a/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/fix.patch
++++ b/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/fix.patch
+@@ -4,7 +4,7 @@ diff -Naur python/PythonCompatCheck/PythonCompatUpdate/PythonCompatUpdate-0.ebui
+ @@ -1,5 +1,5 @@
+ EAPI=7
+ -PYTHON_COMPAT=( python3_7 )
+-+PYTHON_COMPAT=( python3_{7..9} )
+++PYTHON_COMPAT=( python3_{7..10} )
+
+ inherit python-r1
+
+@@ -14,7 +14,7 @@ diff -Naur python/PythonCompatCheck/PythonCompatUpdate/PythonCompatUpdate-1.ebui
+ @@ -1,5 +1,5 @@
+ EAPI=7
+ -PYTHON_COMPAT=( python3_{7,8} )
+-+PYTHON_COMPAT=( python3_{7..9} )
+++PYTHON_COMPAT=( python3_{7..10} )
+
+ inherit python-single-r1
+
+@@ -24,7 +24,7 @@ diff -Naur python/PythonCompatCheck/PythonCompatUpdate/PythonCompatUpdate-2.ebui
+ @@ -1,5 +1,5 @@
+ EAPI=7
+ -PYTHON_COMPAT=( python3_{7,8} )
+-+PYTHON_COMPAT=( python3_{7..9} )
+++PYTHON_COMPAT=( python3_{7..10} )
+
+ inherit python-any-r1
+
+diff --git a/testdata/repos/python/profiles/desc/python_single_target.desc b/testdata/repos/python/profiles/desc/python_single_target.desc
+index da5be2fd..3c39a224 100644
+--- a/testdata/repos/python/profiles/desc/python_single_target.desc
++++ b/testdata/repos/python/profiles/desc/python_single_target.desc
+@@ -3,4 +3,5 @@ python2_7 - Build with Python 2.7
+ python3_7 - Build with Python 3.7
+ python3_8 - Build with Python 3.8
+ python3_9 - Build with Python 3.9
++python3_10 - Build with Python 3.10
+ pypy3 - Build for PyPy3 only
+diff --git a/testdata/repos/python/profiles/desc/python_targets.desc b/testdata/repos/python/profiles/desc/python_targets.desc
+index b2be59ca..8e55f2da 100644
+--- a/testdata/repos/python/profiles/desc/python_targets.desc
++++ b/testdata/repos/python/profiles/desc/python_targets.desc
+@@ -3,4 +3,5 @@ python2_7 - Build with Python 2.7
+ python3_7 - Build with Python 3.7
+ python3_8 - Build with Python 3.8
+ python3_9 - Build with Python 3.9
++python3_10 - Build with Python 3.10
+ pypy3 - Build for PyPy3 only
+diff --git a/testdata/repos/python/stub/python-dep1/python-dep1-0.ebuild b/testdata/repos/python/stub/python-dep1/python-dep1-0.ebuild
+index 9eebedfd..55c455d9 100644
+--- a/testdata/repos/python/stub/python-dep1/python-dep1-0.ebuild
++++ b/testdata/repos/python/stub/python-dep1/python-dep1-0.ebuild
+@@ -1,5 +1,5 @@
+ EAPI=7
+-PYTHON_COMPAT=( python2_7 python3_{7,8,9} )
++PYTHON_COMPAT=( python2_7 python3_{7,8,9,10} )
+
+ inherit python-r1
+
+diff --git a/testdata/repos/python/stub/python-dep2/python-dep2-0.ebuild b/testdata/repos/python/stub/python-dep2/python-dep2-0.ebuild
+index 9eebedfd..55c455d9 100644
+--- a/testdata/repos/python/stub/python-dep2/python-dep2-0.ebuild
++++ b/testdata/repos/python/stub/python-dep2/python-dep2-0.ebuild
+@@ -1,5 +1,5 @@
+ EAPI=7
+-PYTHON_COMPAT=( python2_7 python3_{7,8,9} )
++PYTHON_COMPAT=( python2_7 python3_{7,8,9,10} )
+
+ inherit python-r1
+
+--
+2.31.1
+
diff --git a/dev-util/pkgcheck/pkgcheck-0.9.7-r1.ebuild b/dev-util/pkgcheck/pkgcheck-0.9.7-r1.ebuild
new file mode 100644
index 000000000000..1859af4de531
--- /dev/null
+++ b/dev-util/pkgcheck/pkgcheck-0.9.7-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{8..9} )
+DISTUTILS_IN_SOURCE_BUILD=1
+inherit distutils-r1 optfeature
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/pkgcore/pkgcheck.git"
+ inherit git-r3
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-macos"
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+fi
+
+DESCRIPTION="pkgcore-based QA utility for ebuild repos"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+
+LICENSE="BSD MIT"
+SLOT="0"
+
+if [[ ${PV} == *9999 ]]; then
+ RDEPEND="
+ ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]
+ ~sys-apps/pkgcore-9999[${PYTHON_USEDEP}]"
+else
+ RDEPEND="
+ >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]
+ >=sys-apps/pkgcore-0.11.6[${PYTHON_USEDEP}]"
+fi
+RDEPEND+="
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/lazy-object-proxy[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/pathspec[${PYTHON_USEDEP}]
+ >=dev-python/tree-sitter-0.19.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )
+"
+
+distutils_enable_tests setup.py
+
+PATCHES=(
+ "${FILESDIR}"/${P}-py310-update.patch
+)
+
+src_test() {
+ local -x PYTHONDONTWRITEBYTECODE=
+ distutils-r1_src_test
+}
+
+python_install_all() {
+ local DOCS=( NEWS.rst )
+ [[ ${PV} == *9999 ]] || doman man/*
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature "Network check support" dev-python/requests
+ optfeature "Perl module version check support" dev-perl/Gentoo-PerlMod-Version
+}
diff --git a/dev-util/pkgcheck/pkgcheck-9999.ebuild b/dev-util/pkgcheck/pkgcheck-9999.ebuild
index f801b3b477e3..4f3e1d2a82c8 100644
--- a/dev-util/pkgcheck/pkgcheck-9999.ebuild
+++ b/dev-util/pkgcheck/pkgcheck-9999.ebuild
@@ -42,6 +42,10 @@ BDEPEND="
distutils_enable_tests setup.py
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.7-py310-update.patch
+)
+
src_test() {
local -x PYTHONDONTWRITEBYTECODE=
distutils-r1_src_test