public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] python-any-r1.eclass: Include proper python-exec dep in || deps
@ 2021-12-31  8:26 Michał Górny
  2021-12-31  8:41 ` Michał Górny
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2021-12-31  8:26 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Enforce proper USE dependencies on dev-lang/python-exec from
python-any-r1.  While we force all flags being enabled on it, there is
still a possibility of temporary missync while a new target is being
added.  The explicit dependency should be harmless and ensure correct
package ordering, therefore avoiding errors like:

    python-exec: EPYTHON value invalid (python3.10).

Closes: https://bugs.gentoo.org/830273
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/python-any-r1.eclass | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index 7af9474d9a1f..3d46a2eb4ca0 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -181,7 +181,12 @@ _python_any_set_globals() {
 		_python_export "${i}" PYTHON_PKG_DEP
 
 		# note: need to strip '=' slot operator for || deps
-		deps="${PYTHON_PKG_DEP/:0=/:0} ${deps}"
+		deps="
+			(
+				${PYTHON_PKG_DEP/:0=/:0}
+				>=dev-lang/python-exec-2[python_targets_${i}]
+			)
+			${deps}"
 	done
 	deps="|| ( ${deps})"
 
@@ -266,7 +271,13 @@ python_gen_any_dep() {
 		local i_depstr=${depstr//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
 		i_depstr=${i_depstr//\$\{PYTHON_SINGLE_USEDEP\}/${PYTHON_SINGLE_USEDEP}}
 		# note: need to strip '=' slot operator for || deps
-		out="( ${PYTHON_PKG_DEP%=} ${i_depstr} ) ${out}"
+		out="
+			(
+				${PYTHON_PKG_DEP%=}
+				>=dev-lang/python-exec-2[python_targets_${i}]
+				${i_depstr}
+			)
+			${out}"
 	done
 	echo "|| ( ${out})"
 }
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] [PATCH] python-any-r1.eclass: Include proper python-exec dep in || deps
  2021-12-31  8:26 [gentoo-dev] [PATCH] python-any-r1.eclass: Include proper python-exec dep in || deps Michał Górny
@ 2021-12-31  8:41 ` Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-12-31  8:41 UTC (permalink / raw
  To: gentoo-dev

On Fri, 2021-12-31 at 09:26 +0100, Michał Górny wrote:
> Enforce proper USE dependencies on dev-lang/python-exec from
> python-any-r1.  While we force all flags being enabled on it, there is
> still a possibility of temporary missync while a new target is being
> added.  The explicit dependency should be harmless and ensure correct
> package ordering, therefore avoiding errors like:
> 
>     python-exec: EPYTHON value invalid (python3.10).
> 
> Closes: https://bugs.gentoo.org/830273
> 

Actually, this is wrong, as it adds the dep for Python 2 too.  I have
a better idea that avoids adding it to all packages' metadata.

-- 
Best regards,
Michał Górny



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-31  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-31  8:26 [gentoo-dev] [PATCH] python-any-r1.eclass: Include proper python-exec dep in || deps Michał Górny
2021-12-31  8:41 ` 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