Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 09 Feb 2022 09:39:36
Message-Id: 1644396230.072aacf0f7de7dde594513182851e9f6b519ef26.mgorny@gentoo
1 commit: 072aacf0f7de7dde594513182851e9f6b519ef26
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 4 17:43:52 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 9 08:43:50 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=072aacf0
7
8 python-r1.eclass: Improve comment for USE-dep generation
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 eclass/python-r1.eclass | 12 +++++++++---
13 1 file changed, 9 insertions(+), 3 deletions(-)
14
15 diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
16 index 469c3014abfb..bb851e167617 100644
17 --- a/eclass/python-r1.eclass
18 +++ b/eclass/python-r1.eclass
19 @@ -393,9 +393,15 @@ python_gen_cond_dep() {
20 _python_verify_patterns "${@}"
21 for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
22 if _python_impl_matches "${impl}" "${@}"; then
23 - # substitute ${PYTHON_USEDEP} if used
24 - # (since python_gen_usedep() will not return ${PYTHON_USEDEP}
25 - # the code is run at most once)
26 + # substitute ${PYTHON_USEDEP} with USE-dep on *all* matching
27 + # targets, if it is used. this ensures that Portage will
28 + # report all missing USE flags simultaneously rather than
29 + # requesting the user to enable them one by one.
30 + #
31 + # NB: the first call with replace all instances
32 + # of ${PYTHON_USEDEP}, so the condition will be false
33 + # on subsequent loop iterations and _python_gen_usedep()
34 + # will run at most once.
35 if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then
36 local usedep=$(_python_gen_usedep "${@}")
37 dep=${dep//\$\{PYTHON_USEDEP\}/${usedep}}