public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 18/30] python-r1.eclass: Improve comment for USE-dep generation
Date: Sun,  6 Feb 2022 13:48:29 +0100	[thread overview]
Message-ID: <20220206124841.1299133-19-mgorny@gentoo.org> (raw)
In-Reply-To: <20220206124841.1299133-1-mgorny@gentoo.org>

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/python-r1.eclass | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 469c3014abfb..bb851e167617 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -393,9 +393,15 @@ python_gen_cond_dep() {
 	_python_verify_patterns "${@}"
 	for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
 		if _python_impl_matches "${impl}" "${@}"; then
-			# substitute ${PYTHON_USEDEP} if used
-			# (since python_gen_usedep() will not return ${PYTHON_USEDEP}
-			#  the code is run at most once)
+			# substitute ${PYTHON_USEDEP} with USE-dep on *all* matching
+			# targets, if it is used.  this ensures that Portage will
+			# report all missing USE flags simultaneously rather than
+			# requesting the user to enable them one by one.
+			#
+			# NB: the first call with replace all instances
+			# of ${PYTHON_USEDEP}, so the condition will be false
+			# on subsequent loop iterations and _python_gen_usedep()
+			# will run at most once.
 			if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then
 				local usedep=$(_python_gen_usedep "${@}")
 				dep=${dep//\$\{PYTHON_USEDEP\}/${usedep}}
-- 
2.35.1



  parent reply	other threads:[~2022-02-06 12:54 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-06 12:48 [gentoo-dev] [PATCH 00/30] One batch of Python eclass updates to rule them all Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 01/30] distutils-r1.eclass: Split backend getting code into a function Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 02/30] distutils-r1.eclass: Get wheel name from the backend Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 03/30] distutils-r1.eclass: Create distutils_pep517_install helper Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 04/30] dev-python/isort: Switch to PEP 517 build Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 05/30] python-r1.eclass: Remove deprecated python_gen_usedep Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 06/30] python-any-r1.eclass: Move EPYTHON validity check to python_setup() Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 07/30] python-utils-r1.eclass: Add function to run python_check_deps() Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 08/30] python-any-r1.eclass: Explain the reason for interpreter choice Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 09/30] python-utils-r1.eclass: Report _python_run_check_deps verbosely Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 10/30] python-utils-r1.eclass: Inline python_is_installed Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 11/30] distutils-r1.eclass: Fix has_version for distutils_enable_sphinx Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 12/30] python-utils-r1.eclass: Add a verbose python_has_version() wrapper Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 13/30] distutils-r1.eclass: Use python_has_version in ...enable_sphinx Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 14/30] python-utils-r1.eclass: Fix sphinx_build for non-autodoc case Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 15/30] python-utils-r1.eclass: Remove deprecated python_export Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 16/30] python-utils-r1.eclass: Remove python_wrapper_setup Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 17/30] python-single-r1.eclass: Inline & simplify USE-deps in gen_cond_dep Michał Górny
2022-02-06 12:48 ` Michał Górny [this message]
2022-02-06 12:48 ` [gentoo-dev] [PATCH 19/30] python-utils-r1.eclass: Remove python_is_python3 Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 20/30] python-single-r1.eclass: Remove PYTHON_MULTI_USEDEP Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 21/30] distutils-r1.eclass: Use heredoc instead of "python -c" Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 22/30] python-utils-r1.eclass: " Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 23/30] python-utils-r1.eclass: Remove old phase check from python_optimize Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 24/30] python-utils-r1.eclass: Add status messages to python_optimize Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 25/30] python-utils-r1.eclass: Support matching impls by stdlib version Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 26/30] dev-python/jaraco-text: Use python_gen_cond_dep w/ stdlib ver Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 27/30] python-any-r1.eclass: Do not test EPYTHON twice Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 28/30] python-utils-r1.eclass: Add QA check for obsolete PYTHON_COMPAT Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 29/30] dev-libs/libwacom: Use python_has_version for verbose output Michał Górny
2022-02-08 23:00   ` Matt Turner
2022-02-08 23:18     ` Matt Turner
2022-02-08 23:54     ` Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 30/30] distutils-r1.eclass: Add min version to tomli dep Michał Górny
2022-02-09  7:34 ` [gentoo-dev] [PATCH 00/30] One batch of Python eclass updates to rule them all Sam James
2022-02-09  9:22   ` Joshua Kinard
2022-02-09  9:39   ` Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220206124841.1299133-19-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox