* [gentoo-commits] repo/gentoo:master commit in: sys-apps/pkgcore/files/, sys-apps/pkgcore/
@ 2021-03-15 9:40 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2021-03-15 9:40 UTC (permalink / raw
To: gentoo-commits
commit: 19ce227cc79590203b5c2d9717f7291b45d010f7
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 15 09:36:48 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Mar 15 09:40:28 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19ce227c
sys-apps/pkgcore: Backport metadata.xsd update
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../files/pkgcore-0.10.13-metadata-xsd-2.patch | 40 ++++++++++++++++++++++
...0.10.13-r1.ebuild => pkgcore-0.10.13-r2.ebuild} | 3 +-
...0.10.14-r1.ebuild => pkgcore-0.10.14-r2.ebuild} | 8 +++--
...core-0.11.2.ebuild => pkgcore-0.11.2-r1.ebuild} | 4 +++
...core-0.11.3.ebuild => pkgcore-0.11.3-r1.ebuild} | 4 +++
...core-0.11.4.ebuild => pkgcore-0.11.4-r1.ebuild} | 4 +++
...core-0.11.5.ebuild => pkgcore-0.11.5-r1.ebuild} | 4 +++
7 files changed, 64 insertions(+), 3 deletions(-)
diff --git a/sys-apps/pkgcore/files/pkgcore-0.10.13-metadata-xsd-2.patch b/sys-apps/pkgcore/files/pkgcore-0.10.13-metadata-xsd-2.patch
new file mode 100644
index 00000000000..84aaf93f73d
--- /dev/null
+++ b/sys-apps/pkgcore/files/pkgcore-0.10.13-metadata-xsd-2.patch
@@ -0,0 +1,40 @@
+From cc7be6516d25cfa27b25b5c0ced6b8a8514d46e5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 14 Mar 2021 21:19:46 +0100
+Subject: [PATCH] data: Sync metadata.xsd for proxied="" attr
+
+---
+ data/xml-schema/metadata.xsd | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/data/xml-schema/metadata.xsd b/data/xml-schema/metadata.xsd
+index db243abb..d2e3d4ff 100644
+--- a/data/xml-schema/metadata.xsd
++++ b/data/xml-schema/metadata.xsd
+@@ -127,6 +127,8 @@
+ </xs:choice>
+ <xs:attribute name='type' type='maintainerTypeAttrType'
+ use='required'/>
++ <xs:attribute name='proxied' type='maintainerProxiedAttrType'
++ default='no'/>
+ <xs:attribute name='restrict' type='restrictAttrType'
+ default=''/>
+ </xs:complexType>
+@@ -138,6 +140,14 @@
+ </xs:restriction>
+ </xs:simpleType>
+
++ <xs:simpleType name='maintainerProxiedAttrType'>
++ <xs:restriction base='xs:token'>
++ <xs:enumeration value='yes'/>
++ <xs:enumeration value='no'/>
++ <xs:enumeration value='proxy'/>
++ </xs:restriction>
++ </xs:simpleType>
++
+ <xs:complexType name='upstreamMaintainerType'>
+ <xs:all>
+ <xs:element name='email' type='emailType'
+--
+2.30.2
+
diff --git a/sys-apps/pkgcore/pkgcore-0.10.13-r1.ebuild b/sys-apps/pkgcore/pkgcore-0.10.13-r2.ebuild
similarity index 92%
rename from sys-apps/pkgcore/pkgcore-0.10.13-r1.ebuild
rename to sys-apps/pkgcore/pkgcore-0.10.13-r2.ebuild
index 794dab08f1b..ae71f17fba6 100644
--- a/sys-apps/pkgcore/pkgcore-0.10.13-r1.ebuild
+++ b/sys-apps/pkgcore/pkgcore-0.10.13-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -38,6 +38,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${P}-metadata-xsd.patch"
+ "${FILESDIR}/pkgcore-0.10.13-metadata-xsd-2.patch"
)
python_test() {
diff --git a/sys-apps/pkgcore/pkgcore-0.10.14-r1.ebuild b/sys-apps/pkgcore/pkgcore-0.10.14-r2.ebuild
similarity index 83%
rename from sys-apps/pkgcore/pkgcore-0.10.14-r1.ebuild
rename to sys-apps/pkgcore/pkgcore-0.10.14-r2.ebuild
index 259e6675cd1..1b83ff68afb 100644
--- a/sys-apps/pkgcore/pkgcore-0.10.14-r1.ebuild
+++ b/sys-apps/pkgcore/pkgcore-0.10.14-r2.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_COMPAT=( python3_{7..9} )
DISTUTILS_IN_SOURCE_BUILD=1
inherit distutils-r1
@@ -10,7 +10,7 @@ if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
inherit git-r3
else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-macos"
+ 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
@@ -36,6 +36,10 @@ DEPEND="${RDEPEND}
)
"
+PATCHES=(
+ "${FILESDIR}/pkgcore-0.10.13-metadata-xsd-2.patch"
+)
+
python_test() {
esetup.py test
}
diff --git a/sys-apps/pkgcore/pkgcore-0.11.2.ebuild b/sys-apps/pkgcore/pkgcore-0.11.2-r1.ebuild
similarity index 93%
rename from sys-apps/pkgcore/pkgcore-0.11.2.ebuild
rename to sys-apps/pkgcore/pkgcore-0.11.2-r1.ebuild
index 42c6a3cacd8..7858e1db8e9 100644
--- a/sys-apps/pkgcore/pkgcore-0.11.2.ebuild
+++ b/sys-apps/pkgcore/pkgcore-0.11.2-r1.ebuild
@@ -33,6 +33,10 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}/pkgcore-0.10.13-metadata-xsd-2.patch"
+)
+
distutils_enable_tests setup.py
python_install_all() {
diff --git a/sys-apps/pkgcore/pkgcore-0.11.3.ebuild b/sys-apps/pkgcore/pkgcore-0.11.3-r1.ebuild
similarity index 93%
rename from sys-apps/pkgcore/pkgcore-0.11.3.ebuild
rename to sys-apps/pkgcore/pkgcore-0.11.3-r1.ebuild
index 0bed083a982..77bcb3f7c74 100644
--- a/sys-apps/pkgcore/pkgcore-0.11.3.ebuild
+++ b/sys-apps/pkgcore/pkgcore-0.11.3-r1.ebuild
@@ -33,6 +33,10 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}/pkgcore-0.10.13-metadata-xsd-2.patch"
+)
+
distutils_enable_tests setup.py
python_install_all() {
diff --git a/sys-apps/pkgcore/pkgcore-0.11.4.ebuild b/sys-apps/pkgcore/pkgcore-0.11.4-r1.ebuild
similarity index 94%
rename from sys-apps/pkgcore/pkgcore-0.11.4.ebuild
rename to sys-apps/pkgcore/pkgcore-0.11.4-r1.ebuild
index d98868c1bf8..ac8e37a7a3f 100644
--- a/sys-apps/pkgcore/pkgcore-0.11.4.ebuild
+++ b/sys-apps/pkgcore/pkgcore-0.11.4-r1.ebuild
@@ -33,6 +33,10 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}/pkgcore-0.10.13-metadata-xsd-2.patch"
+)
+
distutils_enable_tests setup.py
src_test() {
diff --git a/sys-apps/pkgcore/pkgcore-0.11.5.ebuild b/sys-apps/pkgcore/pkgcore-0.11.5-r1.ebuild
similarity index 94%
rename from sys-apps/pkgcore/pkgcore-0.11.5.ebuild
rename to sys-apps/pkgcore/pkgcore-0.11.5-r1.ebuild
index d98868c1bf8..ac8e37a7a3f 100644
--- a/sys-apps/pkgcore/pkgcore-0.11.5.ebuild
+++ b/sys-apps/pkgcore/pkgcore-0.11.5-r1.ebuild
@@ -33,6 +33,10 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}/pkgcore-0.10.13-metadata-xsd-2.patch"
+)
+
distutils_enable_tests setup.py
src_test() {
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/pkgcore/files/, sys-apps/pkgcore/
@ 2021-05-09 20:24 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2021-05-09 20:24 UTC (permalink / raw
To: gentoo-commits
commit: e536d2fd0a5a0ace16a215b6bc900d3bee623bc3
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun May 9 20:20:23 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun May 9 20:24:41 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e536d2fd
sys-apps/pkgcore: Fix pmaint hang due to signal handler setup
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../pkgcore/files/pkgcore-0.10.18-sighdlr-2.patch | 56 ++++++++++++++++++++++
sys-apps/pkgcore/pkgcore-0.11.8-r2.ebuild | 52 ++++++++++++++++++++
2 files changed, 108 insertions(+)
diff --git a/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-2.patch b/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-2.patch
new file mode 100644
index 00000000000..d5ab23c4282
--- /dev/null
+++ b/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-2.patch
@@ -0,0 +1,56 @@
+From 9faa4288ce0b9f90292e9afc2777ce62317d861a 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 21:36:32 +0200
+Subject: [PATCH] ebuild.processor: Ensure that signal handlers are set only
+ once
+
+Prevent the signal.signal() calls from being made more than once. This
+was changed in 533f1edd70054a5479ee85719d3cbef0d15627fd when the calls
+were moved to EbuildProcessor's __init__ method. However, it seems
+to cause 'pmaint regen' to hang randomly which keeps blocking Gentoo
+git repository mirrors.
+
+Fixes #307
+---
+ src/pkgcore/ebuild/processor.py | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/src/pkgcore/ebuild/processor.py b/src/pkgcore/ebuild/processor.py
+index 323e7e9a..384dc1f0 100644
+--- a/src/pkgcore/ebuild/processor.py
++++ b/src/pkgcore/ebuild/processor.py
+@@ -24,7 +24,7 @@ import os
+ import signal
+ import threading
+ import traceback
+-from functools import partial, wraps
++from functools import partial, wraps, lru_cache
+ from itertools import chain
+
+ from snakeoil import bash, fileutils, klass
+@@ -297,6 +297,12 @@ def chuck_StoppingCommand(ebp, line):
+ raise ProcessorError(args[1])
+
+
++@lru_cache(maxsize=None)
++def set_signal_handlers():
++ signal.signal(signal.SIGTERM, partial(chuck_TermInterrupt, None))
++ signal.signal(signal.SIGINT, chuck_KeyboardInterrupt)
++
++
+ class EbuildProcessor:
+ """Abstraction of a running ebd instance.
+
+@@ -320,8 +326,7 @@ class EbuildProcessor:
+ self._outstanding_expects = []
+ self._metadata_paths = None
+
+- signal.signal(signal.SIGTERM, partial(chuck_TermInterrupt, None))
+- signal.signal(signal.SIGINT, chuck_KeyboardInterrupt)
++ set_signal_handlers()
+
+ spawn_opts = {'umask': 0o002}
+ if self.userpriv:
+--
+2.31.1
+
diff --git a/sys-apps/pkgcore/pkgcore-0.11.8-r2.ebuild b/sys-apps/pkgcore/pkgcore-0.11.8-r2.ebuild
new file mode 100644
index 00000000000..37b799d4830
--- /dev/null
+++ b/sys-apps/pkgcore/pkgcore-0.11.8-r2.ebuild
@@ -0,0 +1,52 @@
+# 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
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
+ inherit git-r3
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+fi
+
+DESCRIPTION="a framework for package management"
+HOMEPAGE="https://github.com/pkgcore/pkgcore"
+
+LICENSE="BSD MIT"
+SLOT="0"
+
+RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
+if [[ ${PV} == *9999 ]]; then
+ RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
+else
+ RDEPEND+=" >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]"
+fi
+BDEPEND="
+ test? (
+ >=dev-python/pytest-6[${PYTHON_USEDEP}]
+ dev-vcs/git
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/pkgcore-0.10.18-sighdlr.patch"
+ "${FILESDIR}/pkgcore-0.10.18-sighdlr-2.patch"
+)
+
+distutils_enable_tests setup.py
+
+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
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/pkgcore/files/, sys-apps/pkgcore/
@ 2021-05-10 18:08 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2021-05-10 18:08 UTC (permalink / raw
To: gentoo-commits
commit: ac097c8dd7790b8bbf733e6880e1d69f427ae065
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon May 10 18:00:55 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon May 10 18:01:31 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac097c8d
sys-apps/pkgcore: Revert "Fix pmaint hang due to signal handler..."
The patch does not resolve the problem fully.
Reverts: e536d2fd0a5a0ace16a215b6bc900d3bee623bc3
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../pkgcore/files/pkgcore-0.10.18-sighdlr-2.patch | 56 ----------------------
sys-apps/pkgcore/pkgcore-0.11.8-r2.ebuild | 52 --------------------
2 files changed, 108 deletions(-)
diff --git a/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-2.patch b/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-2.patch
deleted file mode 100644
index d5ab23c4282..00000000000
--- a/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-2.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 9faa4288ce0b9f90292e9afc2777ce62317d861a 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 21:36:32 +0200
-Subject: [PATCH] ebuild.processor: Ensure that signal handlers are set only
- once
-
-Prevent the signal.signal() calls from being made more than once. This
-was changed in 533f1edd70054a5479ee85719d3cbef0d15627fd when the calls
-were moved to EbuildProcessor's __init__ method. However, it seems
-to cause 'pmaint regen' to hang randomly which keeps blocking Gentoo
-git repository mirrors.
-
-Fixes #307
----
- src/pkgcore/ebuild/processor.py | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/src/pkgcore/ebuild/processor.py b/src/pkgcore/ebuild/processor.py
-index 323e7e9a..384dc1f0 100644
---- a/src/pkgcore/ebuild/processor.py
-+++ b/src/pkgcore/ebuild/processor.py
-@@ -24,7 +24,7 @@ import os
- import signal
- import threading
- import traceback
--from functools import partial, wraps
-+from functools import partial, wraps, lru_cache
- from itertools import chain
-
- from snakeoil import bash, fileutils, klass
-@@ -297,6 +297,12 @@ def chuck_StoppingCommand(ebp, line):
- raise ProcessorError(args[1])
-
-
-+@lru_cache(maxsize=None)
-+def set_signal_handlers():
-+ signal.signal(signal.SIGTERM, partial(chuck_TermInterrupt, None))
-+ signal.signal(signal.SIGINT, chuck_KeyboardInterrupt)
-+
-+
- class EbuildProcessor:
- """Abstraction of a running ebd instance.
-
-@@ -320,8 +326,7 @@ class EbuildProcessor:
- self._outstanding_expects = []
- self._metadata_paths = None
-
-- signal.signal(signal.SIGTERM, partial(chuck_TermInterrupt, None))
-- signal.signal(signal.SIGINT, chuck_KeyboardInterrupt)
-+ set_signal_handlers()
-
- spawn_opts = {'umask': 0o002}
- if self.userpriv:
---
-2.31.1
-
diff --git a/sys-apps/pkgcore/pkgcore-0.11.8-r2.ebuild b/sys-apps/pkgcore/pkgcore-0.11.8-r2.ebuild
deleted file mode 100644
index 37b799d4830..00000000000
--- a/sys-apps/pkgcore/pkgcore-0.11.8-r2.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
- inherit git-r3
-else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-fi
-
-DESCRIPTION="a framework for package management"
-HOMEPAGE="https://github.com/pkgcore/pkgcore"
-
-LICENSE="BSD MIT"
-SLOT="0"
-
-RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
-if [[ ${PV} == *9999 ]]; then
- RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
-else
- RDEPEND+=" >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]"
-fi
-BDEPEND="
- test? (
- >=dev-python/pytest-6[${PYTHON_USEDEP}]
- dev-vcs/git
- )
-"
-
-PATCHES=(
- "${FILESDIR}/pkgcore-0.10.18-sighdlr.patch"
- "${FILESDIR}/pkgcore-0.10.18-sighdlr-2.patch"
-)
-
-distutils_enable_tests setup.py
-
-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
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/pkgcore/files/, sys-apps/pkgcore/
@ 2021-05-15 11:51 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2021-05-15 11:51 UTC (permalink / raw
To: gentoo-commits
commit: c9a80c87a87a9325d3bc814f57fd8a642bc591a7
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 15 09:43:31 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 15 11:51:27 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9a80c87
sys-apps/pkgcore: Try another pytest-sighandler fix
The original fix for pkgcore's signal handlers breaking pkgcore causes
'pmaint regen' to hang frequently. Try to use delayed imports instead
as that seems to fix the original pytest plugin problem without
affecting pmaint.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../pkgcore/files/pkgcore-0.10.18-sighdlr-r1.patch | 67 ++++++++++++++++++++++
sys-apps/pkgcore/pkgcore-0.11.8-r3.ebuild | 51 ++++++++++++++++
2 files changed, 118 insertions(+)
diff --git a/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-r1.patch b/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-r1.patch
new file mode 100644
index 00000000000..a48bfc5873b
--- /dev/null
+++ b/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-r1.patch
@@ -0,0 +1,67 @@
+From 303826ceb22985cfa1dfbf1e7a68ed327ffc741b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 15 May 2021 09:30:58 +0200
+Subject: [PATCH] pytest: Delay loading pkgcore modules until fixtures are used
+
+Delay loading pkgcore modules until the EbuildRepo-based fixtures are
+actually used. This prevents the pkgcore signal handlers from being
+enabled on all packages using pytest while keeping the old behavior
+of setting them upon import in packages using pkgcore directly.
+---
+ src/pkgcore/pytest/plugin.py | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/src/pkgcore/pytest/plugin.py b/src/pkgcore/pytest/plugin.py
+index 082538ab..bdc89e4b 100644
+--- a/src/pkgcore/pytest/plugin.py
++++ b/src/pkgcore/pytest/plugin.py
+@@ -1,3 +1,4 @@
++import importlib
+ import os
+ import subprocess
+ import textwrap
+@@ -5,8 +6,6 @@ from collections.abc import MutableSet
+ from datetime import datetime
+
+ import pytest
+-from pkgcore.ebuild import cpv as cpv_mod
+-from pkgcore.ebuild import repo_objs, repository
+ from snakeoil import klass
+ from snakeoil.fileutils import touch
+ from snakeoil.osutils import pjoin
+@@ -169,6 +168,12 @@ class EbuildRepo:
+ """Class for creating/manipulating ebuild repos."""
+
+ def __init__(self, path, repo_id='fake', eapi='5', masters=(), arches=()):
++ # load pkgcore modules late to avoid overriding signal handlers
++ # when the plugin is not actually used
++ self.cpv_mod = importlib.import_module('pkgcore.ebuild.cpv')
++ self.repo_objs = importlib.import_module('pkgcore.ebuild.repo_objs')
++ self.repository = importlib.import_module('pkgcore.ebuild.repository')
++
+ self.path = path
+ self.arches = _FileSet(pjoin(self.path, 'profiles', 'arch.list'))
+ self._today = datetime.today()
+@@ -194,8 +199,8 @@ class EbuildRepo:
+
+ def sync(self):
+ """Forcibly create underlying repo object avoiding cache usage."""
+- repo_config = repo_objs.RepoConfig(location=self.path, disable_inst_caching=True)
+- self._repo = repository.UnconfiguredTree(self.path, repo_config=repo_config)
++ repo_config = self.repo_objs.RepoConfig(location=self.path, disable_inst_caching=True)
++ self._repo = self.repository.UnconfiguredTree(self.path, repo_config=repo_config)
+
+ def create_profiles(self, profiles):
+ for p in profiles:
+@@ -215,7 +220,7 @@ class EbuildRepo:
+ f.write(f'{p.eapi}\n')
+
+ def create_ebuild(self, cpvstr, data=None, **kwargs):
+- cpv = cpv_mod.VersionedCPV(cpvstr)
++ cpv = self.cpv_mod.VersionedCPV(cpvstr)
+ self._repo.notify_add_package(cpv)
+ ebuild_dir = pjoin(self.path, cpv.category, cpv.package)
+ os.makedirs(ebuild_dir, exist_ok=True)
+--
+2.31.1
+
diff --git a/sys-apps/pkgcore/pkgcore-0.11.8-r3.ebuild b/sys-apps/pkgcore/pkgcore-0.11.8-r3.ebuild
new file mode 100644
index 00000000000..4365e1e2ed7
--- /dev/null
+++ b/sys-apps/pkgcore/pkgcore-0.11.8-r3.ebuild
@@ -0,0 +1,51 @@
+# 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
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
+ inherit git-r3
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+fi
+
+DESCRIPTION="a framework for package management"
+HOMEPAGE="https://github.com/pkgcore/pkgcore"
+
+LICENSE="BSD MIT"
+SLOT="0"
+
+RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
+if [[ ${PV} == *9999 ]]; then
+ RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
+else
+ RDEPEND+=" >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]"
+fi
+BDEPEND="
+ test? (
+ >=dev-python/pytest-6[${PYTHON_USEDEP}]
+ dev-vcs/git
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/pkgcore-0.10.18-sighdlr-r1.patch"
+)
+
+distutils_enable_tests setup.py
+
+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
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/pkgcore/files/, sys-apps/pkgcore/
@ 2021-05-23 8:01 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2021-05-23 8:01 UTC (permalink / raw
To: gentoo-commits
commit: 37e9e72a495f6524ae107c614f0e2d7059d90ebb
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun May 23 07:23:02 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun May 23 08:01:22 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37e9e72a
sys-apps/pkgcore: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sys-apps/pkgcore/Manifest | 2 -
.../files/pkgcore-0.10.13-metadata-xsd-2.patch | 40 ----------------
sys-apps/pkgcore/pkgcore-0.11.2-r2.ebuild | 48 -------------------
sys-apps/pkgcore/pkgcore-0.11.5-r3.ebuild | 54 ----------------------
sys-apps/pkgcore/pkgcore-0.11.8-r1.ebuild | 51 --------------------
5 files changed, 195 deletions(-)
diff --git a/sys-apps/pkgcore/Manifest b/sys-apps/pkgcore/Manifest
index 8f44b229a78..4a735e480fe 100644
--- a/sys-apps/pkgcore/Manifest
+++ b/sys-apps/pkgcore/Manifest
@@ -1,5 +1,3 @@
-DIST pkgcore-0.11.2.tar.gz 641792 BLAKE2B 295cc8302badcae333939d69329331be5f76d965549c75140ce809d693cf688fe3d3152c44a9d738aa2d90ed1c9f4aad2cf3c9a9a3a52a067e69cf7dd6c87b96 SHA512 602e7ad03699b3b3f302d6d414a9587f1c7829be83898e055e8e1a46e2a805b535cb715bbbb4d43100f77b8b119e13e8b1e374f45be879b4c9dfe02340f225d6
-DIST pkgcore-0.11.5.tar.gz 637303 BLAKE2B bd7e609039253864bf02c9a6cb084b54971a37b7d18d8c8234dcea3a7f25f25ec6652f51fc451bd991727f147d1341ee8ab7ecbcb37b727966708c1248fef428 SHA512 59a31cc9166ae2b12ec2cb349a5e29ce06999c532f7007af2392773a1e6f91ae7d6fa91c123991368dfe5ebdd7edc4ccc2a23fbf008c22b7e251562c8deb8bf8
DIST pkgcore-0.11.6.tar.gz 634191 BLAKE2B c06f24006be697771dd3d7569e3a27310dca56c05047ac991c2db359838dddd5eec78c8d424e826b39968cc496be6e7eb366668bfa45082aac438b663015cb8a SHA512 e556d20100c0234d319ed2e15686a3bb9f388f1cdefd7188958c3c0b32d741dd531cbbe8d377b0736662f66b3241e633491a72a1ce84dd86790e9f543b3d0800
DIST pkgcore-0.11.8.tar.gz 631665 BLAKE2B 1e33ce394c1df9418d22fc8653fca4da1b4e27d53325167e3b7231fb8382f3c81daa7a93587ab2226116865546d4ca1ae1dd4265ccc2adc9cb9b27106d9c352b SHA512 42ed7c54db5fa48dffa5e3927afae32d1b4db92da41eff99c8eaa10232fdeae4e0f3f4d39b1e1b4e3881304523822a9a99575648809c554e3bdcf59d9eab485b
DIST pkgcore-0.12.0.tar.gz 621376 BLAKE2B d58390ad7251fc48465d744a0b0694210d1f1cf505b072c06dc9731819b327b1edfa60d0f89db113852c87109c6340c8c13c72ae2d89b517d5fca34b53632b6b SHA512 d066a2f2deb4f654b04f9e78d37bf88a97f67f0396f5867ffe3a18f8c0d6459d73721b66cad52a50581ee10420694a1fd195b28a013b3a97cb1ebf08bc59598b
diff --git a/sys-apps/pkgcore/files/pkgcore-0.10.13-metadata-xsd-2.patch b/sys-apps/pkgcore/files/pkgcore-0.10.13-metadata-xsd-2.patch
deleted file mode 100644
index 84aaf93f73d..00000000000
--- a/sys-apps/pkgcore/files/pkgcore-0.10.13-metadata-xsd-2.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From cc7be6516d25cfa27b25b5c0ced6b8a8514d46e5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 14 Mar 2021 21:19:46 +0100
-Subject: [PATCH] data: Sync metadata.xsd for proxied="" attr
-
----
- data/xml-schema/metadata.xsd | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/data/xml-schema/metadata.xsd b/data/xml-schema/metadata.xsd
-index db243abb..d2e3d4ff 100644
---- a/data/xml-schema/metadata.xsd
-+++ b/data/xml-schema/metadata.xsd
-@@ -127,6 +127,8 @@
- </xs:choice>
- <xs:attribute name='type' type='maintainerTypeAttrType'
- use='required'/>
-+ <xs:attribute name='proxied' type='maintainerProxiedAttrType'
-+ default='no'/>
- <xs:attribute name='restrict' type='restrictAttrType'
- default=''/>
- </xs:complexType>
-@@ -138,6 +140,14 @@
- </xs:restriction>
- </xs:simpleType>
-
-+ <xs:simpleType name='maintainerProxiedAttrType'>
-+ <xs:restriction base='xs:token'>
-+ <xs:enumeration value='yes'/>
-+ <xs:enumeration value='no'/>
-+ <xs:enumeration value='proxy'/>
-+ </xs:restriction>
-+ </xs:simpleType>
-+
- <xs:complexType name='upstreamMaintainerType'>
- <xs:all>
- <xs:element name='email' type='emailType'
---
-2.30.2
-
diff --git a/sys-apps/pkgcore/pkgcore-0.11.2-r2.ebuild b/sys-apps/pkgcore/pkgcore-0.11.2-r2.ebuild
deleted file mode 100644
index 0de5a597644..00000000000
--- a/sys-apps/pkgcore/pkgcore-0.11.2-r2.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# 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
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.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="a framework for package management"
-HOMEPAGE="https://github.com/pkgcore/pkgcore"
-
-LICENSE="BSD MIT"
-SLOT="0"
-
-RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
-if [[ ${PV} == *9999 ]]; then
- RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
-else
- RDEPEND+="
- <dev-python/snakeoil-0.9.5[${PYTHON_USEDEP}]
- >=dev-python/snakeoil-0.9.2[${PYTHON_USEDEP}]"
-fi
-BDEPEND="
- test? (
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-vcs/git
- )
-"
-
-PATCHES=(
- "${FILESDIR}/pkgcore-0.10.13-metadata-xsd-2.patch"
-)
-
-distutils_enable_tests setup.py
-
-python_install_all() {
- local DOCS=( NEWS.rst )
- [[ ${PV} == *9999 ]] || doman man/*
- distutils-r1_python_install_all
-}
diff --git a/sys-apps/pkgcore/pkgcore-0.11.5-r3.ebuild b/sys-apps/pkgcore/pkgcore-0.11.5-r3.ebuild
deleted file mode 100644
index 7aca2d4c654..00000000000
--- a/sys-apps/pkgcore/pkgcore-0.11.5-r3.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# 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
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.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="a framework for package management"
-HOMEPAGE="https://github.com/pkgcore/pkgcore"
-
-LICENSE="BSD MIT"
-SLOT="0"
-
-RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
-if [[ ${PV} == *9999 ]]; then
- RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
-else
- RDEPEND+="
- <dev-python/snakeoil-0.9.5[${PYTHON_USEDEP}]
- >=dev-python/snakeoil-0.9.3[${PYTHON_USEDEP}]"
-fi
-BDEPEND="
- test? (
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-vcs/git
- )
-"
-
-PATCHES=(
- "${FILESDIR}/pkgcore-0.10.13-metadata-xsd-2.patch"
- "${FILESDIR}/pkgcore-0.10.18-sighdlr.patch"
-)
-
-distutils_enable_tests setup.py
-
-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
-}
diff --git a/sys-apps/pkgcore/pkgcore-0.11.8-r1.ebuild b/sys-apps/pkgcore/pkgcore-0.11.8-r1.ebuild
deleted file mode 100644
index ccaf1c6d439..00000000000
--- a/sys-apps/pkgcore/pkgcore-0.11.8-r1.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# 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
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
- inherit git-r3
-else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-fi
-
-DESCRIPTION="a framework for package management"
-HOMEPAGE="https://github.com/pkgcore/pkgcore"
-
-LICENSE="BSD MIT"
-SLOT="0"
-
-RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
-if [[ ${PV} == *9999 ]]; then
- RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
-else
- RDEPEND+=" >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]"
-fi
-BDEPEND="
- test? (
- >=dev-python/pytest-6[${PYTHON_USEDEP}]
- dev-vcs/git
- )
-"
-
-PATCHES=(
- "${FILESDIR}/pkgcore-0.10.18-sighdlr.patch"
-)
-
-distutils_enable_tests setup.py
-
-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
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/pkgcore/files/, sys-apps/pkgcore/
@ 2021-08-25 16:55 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2021-08-25 16:55 UTC (permalink / raw
To: gentoo-commits
commit: a9cbfc9f0ecb5344ed5540edec13a8278d8dd22b
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 25 16:54:00 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Aug 25 16:54:00 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9cbfc9f
sys-apps/pkgcore: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sys-apps/pkgcore/Manifest | 6 --
.../pkgcore/files/pkgcore-0.10.18-sighdlr-r1.patch | 67 ----------------------
.../pkgcore/files/pkgcore-0.10.18-sighdlr.patch | 47 ---------------
sys-apps/pkgcore/pkgcore-0.11.6-r1.ebuild | 51 ----------------
sys-apps/pkgcore/pkgcore-0.11.8-r3.ebuild | 51 ----------------
sys-apps/pkgcore/pkgcore-0.12.0.ebuild | 51 ----------------
sys-apps/pkgcore/pkgcore-0.12.1-r1.ebuild | 49 ----------------
sys-apps/pkgcore/pkgcore-0.12.2.ebuild | 50 ----------------
sys-apps/pkgcore/pkgcore-0.12.3.ebuild | 50 ----------------
9 files changed, 422 deletions(-)
diff --git a/sys-apps/pkgcore/Manifest b/sys-apps/pkgcore/Manifest
index e8a87910373..29e3002c36a 100644
--- a/sys-apps/pkgcore/Manifest
+++ b/sys-apps/pkgcore/Manifest
@@ -1,7 +1 @@
-DIST pkgcore-0.11.6.tar.gz 634191 BLAKE2B c06f24006be697771dd3d7569e3a27310dca56c05047ac991c2db359838dddd5eec78c8d424e826b39968cc496be6e7eb366668bfa45082aac438b663015cb8a SHA512 e556d20100c0234d319ed2e15686a3bb9f388f1cdefd7188958c3c0b32d741dd531cbbe8d377b0736662f66b3241e633491a72a1ce84dd86790e9f543b3d0800
-DIST pkgcore-0.11.8.tar.gz 631665 BLAKE2B 1e33ce394c1df9418d22fc8653fca4da1b4e27d53325167e3b7231fb8382f3c81daa7a93587ab2226116865546d4ca1ae1dd4265ccc2adc9cb9b27106d9c352b SHA512 42ed7c54db5fa48dffa5e3927afae32d1b4db92da41eff99c8eaa10232fdeae4e0f3f4d39b1e1b4e3881304523822a9a99575648809c554e3bdcf59d9eab485b
-DIST pkgcore-0.12.0.tar.gz 621376 BLAKE2B d58390ad7251fc48465d744a0b0694210d1f1cf505b072c06dc9731819b327b1edfa60d0f89db113852c87109c6340c8c13c72ae2d89b517d5fca34b53632b6b SHA512 d066a2f2deb4f654b04f9e78d37bf88a97f67f0396f5867ffe3a18f8c0d6459d73721b66cad52a50581ee10420694a1fd195b28a013b3a97cb1ebf08bc59598b
-DIST pkgcore-0.12.1.tar.gz 621918 BLAKE2B aa3bedaf4d58d8e604b19ce3e6f97242d29eadbbeab85b7de029d0230a5ea77e2ee96b128381964afe92a327674d64878f833d8c1ddc983c0fe1381b008e2d62 SHA512 a78f3ffd5610f14adb07e2adce07c8446012e742c777d08bbc7ac711bf194508d66a14d21aa56f5d0c9353bd10354fdd34bc6eb4b6017c03bff5d1b565a53575
-DIST pkgcore-0.12.2.tar.gz 621604 BLAKE2B 15964d9a73727028010b7267a61802566aa59f28769f4ac67aa91ccd32708b1a27914ba14957e1da848dc1a2a24ee9fbf92a7b4cee055a7cff22dd1f0d204f58 SHA512 192532dcee696e7ce159efad2f90597aa68801759ceb5ae85484a99a11242c1da98b73290ce1e4c9e29f2c92607989991b3802c4d0fb9bd1f4a866dd80f13cde
-DIST pkgcore-0.12.3.tar.gz 621912 BLAKE2B 629c42b9d0236196d018302b0941d05d36d15d2bdf31f51ef0d212ab0aad2968ff58aa938d22ff8ba65d115e5a1e80e0f444959c2c63aa227f34bd2da3868165 SHA512 6942d13aecfbf0af2969b71b92fcf4e8e938c367fe61e4a748cae14eeeb4ba831b7ac50deb04f4afa8a7f1a6dc31a893ce4106e54b188ff0a1036f7afd6798a4
DIST pkgcore-0.12.4.tar.gz 622553 BLAKE2B fc9df4f9499ad20cec439275880e469e1ffd8204b894c0a523ed27a3e55748e58634fca2af693fcc453e8aec068733a944331f7cea52e983e50981374239d534 SHA512 bc9eccd8d903e987df97354de008826dd52a7db0d9def064c56bb9425d1aa69e8fdf15dcfd0f86057c98a3c0adefee633a3c1cc9b689a334c126730cbdeafd0c
diff --git a/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-r1.patch b/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-r1.patch
deleted file mode 100644
index a48bfc5873b..00000000000
--- a/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr-r1.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 303826ceb22985cfa1dfbf1e7a68ed327ffc741b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sat, 15 May 2021 09:30:58 +0200
-Subject: [PATCH] pytest: Delay loading pkgcore modules until fixtures are used
-
-Delay loading pkgcore modules until the EbuildRepo-based fixtures are
-actually used. This prevents the pkgcore signal handlers from being
-enabled on all packages using pytest while keeping the old behavior
-of setting them upon import in packages using pkgcore directly.
----
- src/pkgcore/pytest/plugin.py | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/src/pkgcore/pytest/plugin.py b/src/pkgcore/pytest/plugin.py
-index 082538ab..bdc89e4b 100644
---- a/src/pkgcore/pytest/plugin.py
-+++ b/src/pkgcore/pytest/plugin.py
-@@ -1,3 +1,4 @@
-+import importlib
- import os
- import subprocess
- import textwrap
-@@ -5,8 +6,6 @@ from collections.abc import MutableSet
- from datetime import datetime
-
- import pytest
--from pkgcore.ebuild import cpv as cpv_mod
--from pkgcore.ebuild import repo_objs, repository
- from snakeoil import klass
- from snakeoil.fileutils import touch
- from snakeoil.osutils import pjoin
-@@ -169,6 +168,12 @@ class EbuildRepo:
- """Class for creating/manipulating ebuild repos."""
-
- def __init__(self, path, repo_id='fake', eapi='5', masters=(), arches=()):
-+ # load pkgcore modules late to avoid overriding signal handlers
-+ # when the plugin is not actually used
-+ self.cpv_mod = importlib.import_module('pkgcore.ebuild.cpv')
-+ self.repo_objs = importlib.import_module('pkgcore.ebuild.repo_objs')
-+ self.repository = importlib.import_module('pkgcore.ebuild.repository')
-+
- self.path = path
- self.arches = _FileSet(pjoin(self.path, 'profiles', 'arch.list'))
- self._today = datetime.today()
-@@ -194,8 +199,8 @@ class EbuildRepo:
-
- def sync(self):
- """Forcibly create underlying repo object avoiding cache usage."""
-- repo_config = repo_objs.RepoConfig(location=self.path, disable_inst_caching=True)
-- self._repo = repository.UnconfiguredTree(self.path, repo_config=repo_config)
-+ repo_config = self.repo_objs.RepoConfig(location=self.path, disable_inst_caching=True)
-+ self._repo = self.repository.UnconfiguredTree(self.path, repo_config=repo_config)
-
- def create_profiles(self, profiles):
- for p in profiles:
-@@ -215,7 +220,7 @@ class EbuildRepo:
- f.write(f'{p.eapi}\n')
-
- def create_ebuild(self, cpvstr, data=None, **kwargs):
-- cpv = cpv_mod.VersionedCPV(cpvstr)
-+ cpv = self.cpv_mod.VersionedCPV(cpvstr)
- self._repo.notify_add_package(cpv)
- ebuild_dir = pjoin(self.path, cpv.category, cpv.package)
- os.makedirs(ebuild_dir, exist_ok=True)
---
-2.31.1
-
diff --git a/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr.patch b/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr.patch
deleted file mode 100644
index 30cec9114f5..00000000000
--- a/sys-apps/pkgcore/files/pkgcore-0.10.18-sighdlr.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 533f1edd70054a5479ee85719d3cbef0d15627fd Mon Sep 17 00:00:00 2001
-From: Tim Harder <radhermit@gmail.com>
-Date: Sun, 28 Mar 2021 17:18:16 -0600
-Subject: [PATCH] ebuild.processor: register SIGINT and SIGTERM signal handlers
- on ebd init
-
-Rather than at a global, module level to avoid issues with inadvertent
-issues during 3rd party imports, e.g. the pkgcore pytest plugin getting
-autoloaded by some other project's testsuite.
----
- src/pkgcore/ebuild/processor.py | 9 +++------
- 1 file changed, 3 insertions(+), 6 deletions(-)
-
-diff --git a/src/pkgcore/ebuild/processor.py b/src/pkgcore/ebuild/processor.py
-index e8c3c2cd4..65437efcf 100644
---- a/src/pkgcore/ebuild/processor.py
-+++ b/src/pkgcore/ebuild/processor.py
-@@ -275,9 +275,6 @@ def chuck_KeyboardInterrupt(*args):
- raise KeyboardInterrupt("ctrl+c encountered")
-
-
--signal.signal(signal.SIGINT, chuck_KeyboardInterrupt)
--
--
- def chuck_TermInterrupt(ebp, *args):
- """Event handler for SIGTERM."""
- if ebp is None:
-@@ -292,9 +289,6 @@ def chuck_TermInterrupt(ebp, *args):
- ebp.shutdown_processor()
-
-
--signal.signal(signal.SIGTERM, partial(chuck_TermInterrupt, None))
--
--
- def chuck_UnhandledCommand(ebp, line):
- """Event handler for unhandled commands."""
- raise UnhandledCommand(line)
-@@ -332,6 +326,9 @@ def __init__(self, userpriv, sandbox, fd_pipes=None):
- self._outstanding_expects = []
- self._metadata_paths = None
-
-+ signal.signal(signal.SIGTERM, partial(chuck_TermInterrupt, None))
-+ signal.signal(signal.SIGINT, chuck_KeyboardInterrupt)
-+
- if userpriv:
- self.__userpriv = True
- spawn_opts.update({
diff --git a/sys-apps/pkgcore/pkgcore-0.11.6-r1.ebuild b/sys-apps/pkgcore/pkgcore-0.11.6-r1.ebuild
deleted file mode 100644
index 2ff367e894b..00000000000
--- a/sys-apps/pkgcore/pkgcore-0.11.6-r1.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# 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
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.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="a framework for package management"
-HOMEPAGE="https://github.com/pkgcore/pkgcore"
-
-LICENSE="BSD MIT"
-SLOT="0"
-
-RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
-if [[ ${PV} == *9999 ]]; then
- RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
-else
- RDEPEND+=" >=dev-python/snakeoil-0.9.3[${PYTHON_USEDEP}]"
-fi
-BDEPEND="
- test? (
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-vcs/git
- )
-"
-
-PATCHES=(
- "${FILESDIR}/pkgcore-0.10.18-sighdlr.patch"
-)
-
-distutils_enable_tests setup.py
-
-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
-}
diff --git a/sys-apps/pkgcore/pkgcore-0.11.8-r3.ebuild b/sys-apps/pkgcore/pkgcore-0.11.8-r3.ebuild
deleted file mode 100644
index cb4367497c7..00000000000
--- a/sys-apps/pkgcore/pkgcore-0.11.8-r3.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# 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
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
- inherit git-r3
-else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-fi
-
-DESCRIPTION="a framework for package management"
-HOMEPAGE="https://github.com/pkgcore/pkgcore"
-
-LICENSE="BSD MIT"
-SLOT="0"
-
-RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
-if [[ ${PV} == *9999 ]]; then
- RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
-else
- RDEPEND+=" >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]"
-fi
-BDEPEND="
- test? (
- >=dev-python/pytest-6[${PYTHON_USEDEP}]
- dev-vcs/git
- )
-"
-
-PATCHES=(
- "${FILESDIR}/pkgcore-0.10.18-sighdlr-r1.patch"
-)
-
-distutils_enable_tests setup.py
-
-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
-}
diff --git a/sys-apps/pkgcore/pkgcore-0.12.0.ebuild b/sys-apps/pkgcore/pkgcore-0.12.0.ebuild
deleted file mode 100644
index cb4367497c7..00000000000
--- a/sys-apps/pkgcore/pkgcore-0.12.0.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# 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
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
- inherit git-r3
-else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-fi
-
-DESCRIPTION="a framework for package management"
-HOMEPAGE="https://github.com/pkgcore/pkgcore"
-
-LICENSE="BSD MIT"
-SLOT="0"
-
-RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
-if [[ ${PV} == *9999 ]]; then
- RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
-else
- RDEPEND+=" >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]"
-fi
-BDEPEND="
- test? (
- >=dev-python/pytest-6[${PYTHON_USEDEP}]
- dev-vcs/git
- )
-"
-
-PATCHES=(
- "${FILESDIR}/pkgcore-0.10.18-sighdlr-r1.patch"
-)
-
-distutils_enable_tests setup.py
-
-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
-}
diff --git a/sys-apps/pkgcore/pkgcore-0.12.1-r1.ebuild b/sys-apps/pkgcore/pkgcore-0.12.1-r1.ebuild
deleted file mode 100644
index 05d8679fb96..00000000000
--- a/sys-apps/pkgcore/pkgcore-0.12.1-r1.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{8..10} )
-DISTUTILS_IN_SOURCE_BUILD=1
-inherit distutils-r1
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
- inherit git-r3
-else
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-fi
-
-DESCRIPTION="a framework for package management"
-HOMEPAGE="https://github.com/pkgcore/pkgcore"
-
-LICENSE="BSD MIT"
-SLOT="0"
-
-RDEPEND="
- >=app-shells/bash-5.0
- dev-python/lxml[${PYTHON_USEDEP}]"
-if [[ ${PV} == *9999 ]]; then
- RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
-else
- RDEPEND+=" >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]"
-fi
-BDEPEND="
- test? (
- >=dev-python/pytest-6[${PYTHON_USEDEP}]
- dev-vcs/git
- )
-"
-
-distutils_enable_tests setup.py
-
-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
-}
diff --git a/sys-apps/pkgcore/pkgcore-0.12.2.ebuild b/sys-apps/pkgcore/pkgcore-0.12.2.ebuild
deleted file mode 100644
index 5c7eeb03645..00000000000
--- a/sys-apps/pkgcore/pkgcore-0.12.2.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-DISTUTILS_IN_SOURCE_BUILD=1
-inherit distutils-r1
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
- inherit git-r3
-else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-fi
-
-DESCRIPTION="a framework for package management"
-HOMEPAGE="https://github.com/pkgcore/pkgcore"
-
-LICENSE="BSD MIT"
-SLOT="0"
-
-RDEPEND="
- >=app-shells/bash-5.0
- dev-python/lxml[${PYTHON_USEDEP}]"
-if [[ ${PV} == *9999 ]]; then
- RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
-else
- RDEPEND+=" >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]"
-fi
-BDEPEND="
- test? (
- >=dev-python/pytest-6[${PYTHON_USEDEP}]
- dev-vcs/git
- )
-"
-
-distutils_enable_tests setup.py
-
-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
-}
diff --git a/sys-apps/pkgcore/pkgcore-0.12.3.ebuild b/sys-apps/pkgcore/pkgcore-0.12.3.ebuild
deleted file mode 100644
index 5c7eeb03645..00000000000
--- a/sys-apps/pkgcore/pkgcore-0.12.3.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-DISTUTILS_IN_SOURCE_BUILD=1
-inherit distutils-r1
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
- inherit git-r3
-else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-fi
-
-DESCRIPTION="a framework for package management"
-HOMEPAGE="https://github.com/pkgcore/pkgcore"
-
-LICENSE="BSD MIT"
-SLOT="0"
-
-RDEPEND="
- >=app-shells/bash-5.0
- dev-python/lxml[${PYTHON_USEDEP}]"
-if [[ ${PV} == *9999 ]]; then
- RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
-else
- RDEPEND+=" >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]"
-fi
-BDEPEND="
- test? (
- >=dev-python/pytest-6[${PYTHON_USEDEP}]
- dev-vcs/git
- )
-"
-
-distutils_enable_tests setup.py
-
-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
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/pkgcore/files/, sys-apps/pkgcore/
@ 2023-11-24 16:49 Ulrich Müller
0 siblings, 0 replies; 7+ messages in thread
From: Ulrich Müller @ 2023-11-24 16:49 UTC (permalink / raw
To: gentoo-commits
commit: 819eb93c683a4d6fa7c81da8bddb6fef017d4394
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 24 16:43:38 2023 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Nov 24 16:49:38 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=819eb93c
sys-apps/pkgcore: Sync metadata.xsd from xml-schema
Acked-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
.../files/pkgcore-0.12.23-metadata-xsd.patch | 16 +++++++
sys-apps/pkgcore/pkgcore-0.12.23-r1.ebuild | 49 ++++++++++++++++++++++
2 files changed, 65 insertions(+)
diff --git a/sys-apps/pkgcore/files/pkgcore-0.12.23-metadata-xsd.patch b/sys-apps/pkgcore/files/pkgcore-0.12.23-metadata-xsd.patch
new file mode 100644
index 000000000000..abffe300b669
--- /dev/null
+++ b/sys-apps/pkgcore/files/pkgcore-0.12.23-metadata-xsd.patch
@@ -0,0 +1,16 @@
+commit f244de224400d9634742c52c655ac705cce9658a
+Author: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
+Date: Thu Sep 14 12:32:44 2023 +0000
+
+ data/xml-schema/metadata.xsd: add codeberg remote-id
+
+--- a/data/share/pkgcore/xml-schema/metadata.xsd
++++ b/data/share/pkgcore/xml-schema/metadata.xsd
+@@ -271,6 +271,7 @@
+ <xs:simpleType name='upstreamRemoteIdTypeAttrType'>
+ <xs:restriction base='xs:token'>
+ <xs:enumeration value='bitbucket'/>
++ <xs:enumeration value='codeberg'/>
+ <xs:enumeration value='cpan'/>
+ <xs:enumeration value='cpan-module'/>
+ <xs:enumeration value='cpe'/>
diff --git a/sys-apps/pkgcore/pkgcore-0.12.23-r1.ebuild b/sys-apps/pkgcore/pkgcore-0.12.23-r1.ebuild
new file mode 100644
index 000000000000..dd0437c0c1fd
--- /dev/null
+++ b/sys-apps/pkgcore/pkgcore-0.12.23-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=standalone
+PYTHON_COMPAT=( python3_{10..12} )
+inherit distutils-r1
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/pkgcore/pkgcore.git
+ https://github.com/pkgcore/pkgcore.git"
+ inherit git-r3
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
+ inherit pypi
+fi
+
+DESCRIPTION="a framework for package management"
+HOMEPAGE="https://github.com/pkgcore/pkgcore"
+
+LICENSE="BSD MIT"
+SLOT="0"
+
+RDEPEND="
+ >=app-shells/bash-5.0[readline]
+ dev-python/lxml[${PYTHON_USEDEP}]
+"
+if [[ ${PV} == *9999 ]]; then
+ RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
+else
+ RDEPEND+=" >=dev-python/snakeoil-0.10.4[${PYTHON_USEDEP}]"
+fi
+BDEPEND="
+ >=dev-python/flit-core-3.8[${PYTHON_USEDEP}]
+ test? (
+ dev-vcs/git
+ )
+"
+
+PATCHES=( "${FILESDIR}/${P}-metadata-xsd.patch" )
+
+distutils_enable_tests pytest
+
+python_install_all() {
+ local DOCS=( NEWS.rst )
+ [[ ${PV} == *9999 ]] || doman build/sphinx/man/*
+ distutils-r1_python_install_all
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-11-24 16:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-24 16:49 [gentoo-commits] repo/gentoo:master commit in: sys-apps/pkgcore/files/, sys-apps/pkgcore/ Ulrich Müller
-- strict thread matches above, loose matches on Subject: below --
2021-08-25 16:55 Michał Górny
2021-05-23 8:01 Michał Górny
2021-05-15 11:51 Michał Górny
2021-05-10 18:08 Michał Górny
2021-05-09 20:24 Michał Górny
2021-03-15 9:40 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox