Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH] python-any-r1.eclass: Include proper python-exec dep in || deps
Date: Fri, 31 Dec 2021 08:26:26
Message-Id: 20211231082610.222662-1-mgorny@gentoo.org
1 Enforce proper USE dependencies on dev-lang/python-exec from
2 python-any-r1. While we force all flags being enabled on it, there is
3 still a possibility of temporary missync while a new target is being
4 added. The explicit dependency should be harmless and ensure correct
5 package ordering, therefore avoiding errors like:
6
7 python-exec: EPYTHON value invalid (python3.10).
8
9 Closes: https://bugs.gentoo.org/830273
10 Signed-off-by: Michał Górny <mgorny@g.o>
11 ---
12 eclass/python-any-r1.eclass | 15 +++++++++++++--
13 1 file changed, 13 insertions(+), 2 deletions(-)
14
15 diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
16 index 7af9474d9a1f..3d46a2eb4ca0 100644
17 --- a/eclass/python-any-r1.eclass
18 +++ b/eclass/python-any-r1.eclass
19 @@ -181,7 +181,12 @@ _python_any_set_globals() {
20 _python_export "${i}" PYTHON_PKG_DEP
21
22 # note: need to strip '=' slot operator for || deps
23 - deps="${PYTHON_PKG_DEP/:0=/:0} ${deps}"
24 + deps="
25 + (
26 + ${PYTHON_PKG_DEP/:0=/:0}
27 + >=dev-lang/python-exec-2[python_targets_${i}]
28 + )
29 + ${deps}"
30 done
31 deps="|| ( ${deps})"
32
33 @@ -266,7 +271,13 @@ python_gen_any_dep() {
34 local i_depstr=${depstr//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
35 i_depstr=${i_depstr//\$\{PYTHON_SINGLE_USEDEP\}/${PYTHON_SINGLE_USEDEP}}
36 # note: need to strip '=' slot operator for || deps
37 - out="( ${PYTHON_PKG_DEP%=} ${i_depstr} ) ${out}"
38 + out="
39 + (
40 + ${PYTHON_PKG_DEP%=}
41 + >=dev-lang/python-exec-2[python_targets_${i}]
42 + ${i_depstr}
43 + )
44 + ${out}"
45 done
46 echo "|| ( ${out})"
47 }
48 --
49 2.34.1

Replies