* [gentoo-python] [PATCH 1/2] Require EAPI=5 for python-single-r1.
@ 2012-12-17 0:28 Michał Górny
2012-12-17 0:28 ` [gentoo-python] [PATCH 2/2] Re-enable python-r1 -> python-single-r1 dep prevention in EAPI 5+ Michał Górny
2012-12-17 10:37 ` [gentoo-python] [PATCH 1/2] Require EAPI=5 for python-single-r1 Michał Górny
0 siblings, 2 replies; 3+ messages in thread
From: Michał Górny @ 2012-12-17 0:28 UTC (permalink / raw
To: gentoo-python; +Cc: python, sera, Michał Górny
The EAPIs before '5' have USE_EXPAND flags in implicit IUSE, therefore
making it impossible to use '(+)' and '(-)' deps on them. This problem
can be noticed in Paludis (bug #447524) [1].
[1]:https://bugs.gentoo.org/show_bug.cgi?id=447524
---
gx86/eclass/python-single-r1.eclass | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/gx86/eclass/python-single-r1.eclass b/gx86/eclass/python-single-r1.eclass
index 51807f2..d9800e1 100644
--- a/gx86/eclass/python-single-r1.eclass
+++ b/gx86/eclass/python-single-r1.eclass
@@ -32,11 +32,13 @@
# http://www.gentoo.org/proj/en/Python/python-r1/dev-guide.xml
case "${EAPI:-0}" in
- 0|1|2|3)
+ 0|1|2|3|4)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 4|5)
- # EAPI=4 needed by python-r1
+ 5)
+ # EAPIs before '5' have implicit USE flags for USE_EXPAND
+ # making the '(+)' use-deps useless in paludis.
+ # Bug #447524.
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
--
1.8.0.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-python] [PATCH 2/2] Re-enable python-r1 -> python-single-r1 dep prevention in EAPI 5+.
2012-12-17 0:28 [gentoo-python] [PATCH 1/2] Require EAPI=5 for python-single-r1 Michał Górny
@ 2012-12-17 0:28 ` Michał Górny
2012-12-17 10:37 ` [gentoo-python] [PATCH 1/2] Require EAPI=5 for python-single-r1 Michał Górny
1 sibling, 0 replies; 3+ messages in thread
From: Michał Górny @ 2012-12-17 0:28 UTC (permalink / raw
To: gentoo-python; +Cc: python, sera, Michał Górny
---
gx86/eclass/python-r1.eclass | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass
index cfd0a36..3cae4f0 100644
--- a/gx86/eclass/python-r1.eclass
+++ b/gx86/eclass/python-r1.eclass
@@ -133,12 +133,35 @@ fi
_python_set_globals() {
local flags=( "${PYTHON_COMPAT[@]/#/python_targets_}" )
- #local flags_st=( "${PYTHON_COMPAT[@]/#/-python_single_target_}" )
local optflags=${flags[@]/%/?}
- #optflags+=,${flags_st[@]/%/(-)}
- # PYTHON_SINGLE_TARGET safety check temporarily disabled
- # because of issues with paludis, bug #447524.
+ # Here's a nice trick to prevent python-r1 packages from depending
+ # on python-single-r1 packages.
+ #
+ # python-single-r1 enforces at least one PYTHON_SINGLE_TARGET
+ # through REQUIRED_USE. Therefore, we can assume that
+ # python-single-r1 packages have at least one flag set.
+ #
+ # If packages does not use python-single-r1, it should have no
+ # PYTHON_SINGLE_TARGET flags.
+ #
+ # The '-python_single_target...(-)' construct is always true when
+ # there's no PYTHON_SINGLE_TARGET flags. If there is at least one
+ # such flag, there will be at least one set, and the relevant
+ # constraint will prevent the package from being merged.
+ #
+ # Therefore, developer trying to depend on python-single-r1 package
+ # will be unable to merge the package. This should be enough to
+ # prevent him from committing one.
+ #
+ # In EAPI < 5, an implicit IUSE is added for all USE_EXPAND
+ # variables, making '(-)' deps unusable on them. This can be seen
+ # in Paludis (bug #447524). We need at least EAPI=5 for this to work
+ # correctly.
+ if ! has "${EAPI}" 4; then
+ local flags_st=( "${PYTHON_COMPAT[@]/#/-python_single_target_}" )
+ optflags+=,${flags_st[@]/%/(-)}
+ fi
IUSE=${flags[*]}
REQUIRED_USE="|| ( ${flags[*]} )"
--
1.8.0.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [gentoo-python] [PATCH 1/2] Require EAPI=5 for python-single-r1.
2012-12-17 0:28 [gentoo-python] [PATCH 1/2] Require EAPI=5 for python-single-r1 Michał Górny
2012-12-17 0:28 ` [gentoo-python] [PATCH 2/2] Re-enable python-r1 -> python-single-r1 dep prevention in EAPI 5+ Michał Górny
@ 2012-12-17 10:37 ` Michał Górny
1 sibling, 0 replies; 3+ messages in thread
From: Michał Górny @ 2012-12-17 10:37 UTC (permalink / raw
To: Michał Górny; +Cc: gentoo-python, python, sera
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
On Mon, 17 Dec 2012 01:28:22 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> The EAPIs before '5' have USE_EXPAND flags in implicit IUSE, therefore
> making it impossible to use '(+)' and '(-)' deps on them. This problem
> can be noticed in Paludis (bug #447524) [1].
>
> [1]:https://bugs.gentoo.org/show_bug.cgi?id=447524
Please forget about the patches. My late-night logic had a major flow.
The nature of the issue is that all dependent packages have to be
EAPI=5. Therefore, we effectively need to make whole python-r1 require
EAPI=5.
If nobody objects, I'll:
a) add a verbose warning when python-r1 is used with EAPI=4,
b) bump all packages to EAPI=5 (the stable ones preferably with a ping
to the arch team),
c) after a few days, replacing the warning with a fatal error.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-17 10:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 0:28 [gentoo-python] [PATCH 1/2] Require EAPI=5 for python-single-r1 Michał Górny
2012-12-17 0:28 ` [gentoo-python] [PATCH 2/2] Re-enable python-r1 -> python-single-r1 dep prevention in EAPI 5+ Michał Górny
2012-12-17 10:37 ` [gentoo-python] [PATCH 1/2] Require EAPI=5 for python-single-r1 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