public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Eli Schwartz" <eschwartz@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/
Date: Thu, 11 Jul 2024 16:29:59 +0000 (UTC)	[thread overview]
Message-ID: <1720715309.424908701d9854699393101d9a732cfd6a450ef7.eschwartz@gentoo> (raw)

commit:     424908701d9854699393101d9a732cfd6a450ef7
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 11 15:14:42 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Thu Jul 11 16:28:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42490870

app-emulation/libvirt: implement a correct python_check_deps

Due to portage design whereby commands which fail aren't considered
failures unless you explicitly use `|| die`, a common footgun in bash
scripting propagates throughout the portage ecosystem:

the use of `cmd1 && cmd2` for conditional logic.

This python_check_deps function did such, and then handled the case
where `use test` was false by unconditionally ignoring the result of the
previous line by returning 0. Hence, python_check_deps could never
decide that an impl was unable to be used. As a result, if python 3.13
and 3.12 were both installed, but $(python_gen_any_dep ...) discovered
pytest installed solely for 3.12, portage would not reinstall pytest for
3.13 support whereas the eclass would select 3.13 as the preferred
(latest) python impl.

Fix this by correctly using bash, shunning `cmd1 && cmd2`, and instead
using `if cmd1; then cmd2; fi`, which returns correct return values
based on the return value of both cmd1 and cmd2, without requiring
hardcoded `return 0`s of any variety, unconditional or otherwise.

Fixes: bba723505f488b52bd593869b5b9a0df096ffbb4
Bug: https://bugs.gentoo.org/932652
Closes: https://bugs.gentoo.org/935849
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 app-emulation/libvirt/libvirt-10.0.0-r3.ebuild | 5 +++--
 app-emulation/libvirt/libvirt-10.1.0-r2.ebuild | 5 +++--
 app-emulation/libvirt/libvirt-10.2.0-r1.ebuild | 5 +++--
 app-emulation/libvirt/libvirt-10.3.0-r2.ebuild | 5 +++--
 app-emulation/libvirt/libvirt-10.5.0.ebuild    | 5 +++--
 app-emulation/libvirt/libvirt-9999.ebuild      | 5 +++--
 6 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/app-emulation/libvirt/libvirt-10.0.0-r3.ebuild b/app-emulation/libvirt/libvirt-10.0.0-r3.ebuild
index d32d4dfa61eb..e1f5b32c94f2 100644
--- a/app-emulation/libvirt/libvirt-10.0.0-r3.ebuild
+++ b/app-emulation/libvirt/libvirt-10.0.0-r3.ebuild
@@ -158,8 +158,9 @@ PATCHES=(
 )
 
 python_check_deps() {
-	use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
-	return 0
+	if use test; then
+		python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
+	fi
 }
 
 pkg_setup() {

diff --git a/app-emulation/libvirt/libvirt-10.1.0-r2.ebuild b/app-emulation/libvirt/libvirt-10.1.0-r2.ebuild
index 722c2a65d7e5..4b7123665d73 100644
--- a/app-emulation/libvirt/libvirt-10.1.0-r2.ebuild
+++ b/app-emulation/libvirt/libvirt-10.1.0-r2.ebuild
@@ -157,8 +157,9 @@ PATCHES=(
 )
 
 python_check_deps() {
-	use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
-	return 0
+	if use test; then
+		python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
+	fi
 }
 
 pkg_setup() {

diff --git a/app-emulation/libvirt/libvirt-10.2.0-r1.ebuild b/app-emulation/libvirt/libvirt-10.2.0-r1.ebuild
index 53b5807aa428..f888ab84e3c8 100644
--- a/app-emulation/libvirt/libvirt-10.2.0-r1.ebuild
+++ b/app-emulation/libvirt/libvirt-10.2.0-r1.ebuild
@@ -156,8 +156,9 @@ PATCHES=(
 )
 
 python_check_deps() {
-	use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
-	return 0
+	if use test; then
+		python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
+	fi
 }
 
 pkg_setup() {

diff --git a/app-emulation/libvirt/libvirt-10.3.0-r2.ebuild b/app-emulation/libvirt/libvirt-10.3.0-r2.ebuild
index 86977d70b34c..1bdfb61feab9 100644
--- a/app-emulation/libvirt/libvirt-10.3.0-r2.ebuild
+++ b/app-emulation/libvirt/libvirt-10.3.0-r2.ebuild
@@ -157,8 +157,9 @@ PATCHES=(
 )
 
 python_check_deps() {
-	use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
-	return 0
+	if use test; then
+		python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
+	fi
 }
 
 pkg_setup() {

diff --git a/app-emulation/libvirt/libvirt-10.5.0.ebuild b/app-emulation/libvirt/libvirt-10.5.0.ebuild
index 3c850fe537a4..6c1f35a42d3e 100644
--- a/app-emulation/libvirt/libvirt-10.5.0.ebuild
+++ b/app-emulation/libvirt/libvirt-10.5.0.ebuild
@@ -158,8 +158,9 @@ PATCHES=(
 )
 
 python_check_deps() {
-	use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
-	return 0
+	if use test; then
+		python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
+	fi
 }
 
 pkg_setup() {

diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild
index 3c850fe537a4..6c1f35a42d3e 100644
--- a/app-emulation/libvirt/libvirt-9999.ebuild
+++ b/app-emulation/libvirt/libvirt-9999.ebuild
@@ -158,8 +158,9 @@ PATCHES=(
 )
 
 python_check_deps() {
-	use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
-	return 0
+	if use test; then
+		python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]"
+	fi
 }
 
 pkg_setup() {


             reply	other threads:[~2024-07-11 16:30 UTC|newest]

Thread overview: 345+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 16:29 Eli Schwartz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-11  2:48 [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/ Sam James
2024-10-17  5:01 Sam James
2024-10-17  5:01 Sam James
2024-10-14  4:29 Viorel Munteanu
2024-10-05 14:19 Sam James
2024-09-11  0:15 Sam James
2024-08-31 14:10 Joonas Niilola
2024-08-30 19:12 Sam James
2024-08-25 18:59 Sam James
2024-08-25 18:59 Sam James
2024-07-11  0:34 Eli Schwartz
2024-07-07  7:39 Sam James
2024-07-07  7:39 Sam James
2024-07-03 21:21 Matthias Maier
2024-06-10  7:24 Arthur Zamarin
2024-06-09  3:31 Ionen Wolkens
2024-06-09  3:31 Ionen Wolkens
2024-06-09  3:31 Ionen Wolkens
2024-06-08  9:55 Arthur Zamarin
2024-05-28  1:59 Sam James
2024-05-03  3:32 Sam James
2024-04-13 18:49 Sam James
2024-04-13 18:49 Sam James
2024-03-14  5:54 Sam James
2024-01-30  4:05 Ionen Wolkens
2024-01-30  4:05 Ionen Wolkens
2024-01-03 18:52 Arthur Zamarin
2023-11-12  7:42 Sam James
2023-11-12  7:42 Sam James
2023-10-31 19:21 Sam James
2023-10-04 17:46 Matthias Maier
2023-10-03  1:55 Sam James
2023-08-02 17:59 Sam James
2023-07-21 15:29 Arthur Zamarin
2023-07-21 15:29 Arthur Zamarin
2023-07-12  9:17 Sam James
2023-07-12  9:17 Sam James
2023-06-18 12:56 Joonas Niilola
2023-06-18 12:56 Joonas Niilola
2023-06-18  1:54 Matthias Maier
2023-06-07 19:21 Arthur Zamarin
2023-06-04  1:09 Sam James
2023-06-01  7:26 Joonas Niilola
2023-06-01  6:46 Joonas Niilola
2023-05-05 10:14 Sam James
2023-05-05  4:44 Sam James
2023-04-13 15:16 Matthias Maier
2023-04-11 19:04 Sam James
2023-02-26 18:33 Arthur Zamarin
2023-02-14  2:56 Sam James
2023-02-14  2:56 Sam James
2023-02-12  8:33 Joonas Niilola
2023-02-12  7:42 Joonas Niilola
2023-01-27  0:30 Sam James
2023-01-27  0:17 Sam James
2022-11-22  7:50 Arthur Zamarin
2022-11-11 15:14 Matthias Maier
2022-11-11 15:14 Matthias Maier
2022-10-17  3:07 John Helmert III
2022-10-12 23:11 Sam James
2022-09-23  7:04 Agostino Sarubbo
2022-09-23  7:03 Agostino Sarubbo
2022-09-23  7:02 Agostino Sarubbo
2022-09-01 21:49 Sam James
2022-07-04 23:24 Sam James
2022-06-24 20:57 Jakov Smolić
2022-06-03  3:08 Sam James
2022-05-31  8:03 Sam James
2022-05-31  7:29 Sam James
2022-05-05  7:07 Jakov Smolić
2022-05-02 10:22 Joonas Niilola
2022-05-02  7:33 Joonas Niilola
2022-04-19 20:17 Sam James
2022-04-04  1:34 Sam James
2022-04-03  4:36 Sam James
2022-02-18  2:44 Sam James
2022-01-25 12:33 Matthias Maier
2022-01-15  2:10 Sam James
2022-01-15  1:47 Sam James
2021-12-11  1:20 Sam James
2021-12-10  0:22 Sam James
2021-12-10  0:20 Sam James
2021-12-08  3:23 Matthias Maier
2021-11-06  6:48 Arthur Zamarin
2021-10-16 14:02 Agostino Sarubbo
2021-10-16  7:10 Agostino Sarubbo
2021-10-15 23:49 Sam James
2021-10-15 23:49 Sam James
2021-10-15 23:49 Sam James
2021-10-15 23:49 Sam James
2021-10-13  2:54 Matthias Maier
2021-09-10 15:32 Matthias Maier
2021-07-31 13:40 Michał Górny
2021-07-14 17:56 Joonas Niilola
2021-07-14 17:56 Joonas Niilola
2021-06-16 10:34 Sam James
2021-06-16 10:34 Sam James
2021-06-10  6:44 Matthias Maier
2021-06-09 23:46 Matthias Maier
2021-06-09 20:43 Matthias Maier
2021-06-05 11:09 Sergei Trofimovich
2021-05-17  4:54 Matthias Maier
2021-05-17  4:54 Matthias Maier
2021-04-22 13:41 Matthias Maier
2021-04-22 13:41 Matthias Maier
2021-04-04 17:39 Matthias Maier
2021-04-04 17:39 Matthias Maier
2021-03-15 19:47 Joonas Niilola
2021-03-12  8:15 Mikle Kolyada
2021-03-11 15:14 Matthias Maier
2021-03-11  4:26 Matthias Maier
2021-02-19 19:32 Thomas Deutschmann
2021-02-11 18:02 Matthias Maier
2021-02-11 18:02 Matthias Maier
2021-02-11 18:02 Matthias Maier
2021-02-11 18:02 Matthias Maier
2021-02-11 18:02 Matthias Maier
2021-02-11 18:02 Matthias Maier
2021-02-11 18:02 Matthias Maier
2021-01-17  4:34 Sam James
2021-01-17  4:34 Sam James
2020-12-25 20:03 Matthias Maier
2020-12-22 22:46 Matthias Maier
2020-12-05 17:22 Matthias Maier
2020-12-04  5:53 Matthias Maier
2020-11-10 18:13 Sam James
2020-11-10 18:12 Sam James
2020-11-06  1:17 Matthias Maier
2020-11-01 21:47 Matthias Maier
2020-10-05 23:24 Sam James
2020-10-05 23:24 Sam James
2020-10-01 23:47 Matthias Maier
2020-10-01 23:47 Matthias Maier
2020-10-01 23:47 Matthias Maier
2020-10-01 23:47 Matthias Maier
2020-10-01 23:47 Matthias Maier
2020-10-01 23:47 Matthias Maier
2020-09-21 14:12 Michał Górny
2020-09-13  7:53 Sam James
2020-09-09 21:31 Sam James
2020-08-20 13:20 Sam James
2020-08-18  6:43 Sergei Trofimovich
2020-08-18  6:43 Sergei Trofimovich
2020-08-09 15:04 Sergei Trofimovich
2020-08-09 15:04 Sergei Trofimovich
2020-05-09  7:39 Agostino Sarubbo
2020-04-27  6:42 Matthias Maier
2020-04-26 23:44 Thomas Deutschmann
2020-04-15 18:19 Matthias Maier
2020-04-05 17:19 Matthias Maier
2020-03-19  3:37 Matthias Maier
2020-03-15 18:41 Agostino Sarubbo
2020-03-14 19:46 Agostino Sarubbo
2020-03-13 16:40 Matthias Maier
2020-03-13 16:40 Matthias Maier
2020-02-10 16:04 Matthias Maier
2020-02-10 16:04 Matthias Maier
2020-02-10 16:04 Matthias Maier
2020-02-06 15:52 Matthias Maier
2020-02-06 15:52 Matthias Maier
2020-02-06 15:52 Matthias Maier
2020-02-06 15:52 Matthias Maier
2020-02-06 15:52 Matthias Maier
2020-02-03 15:24 Agostino Sarubbo
2020-02-03 12:38 Agostino Sarubbo
2020-01-03 14:30 Agostino Sarubbo
2020-01-01 15:30 Agostino Sarubbo
2019-12-31 22:01 Matthias Maier
2019-12-28 21:32 Georgy Yakovlev
2019-12-28 21:32 Georgy Yakovlev
2019-12-03 18:49 Matthias Maier
2019-12-02 14:42 Doug Goldstein
2019-12-02 14:42 Doug Goldstein
2019-12-02 14:42 Doug Goldstein
2019-10-15 16:09 Matthias Maier
2019-10-15 16:09 Matthias Maier
2019-10-15 16:09 Matthias Maier
2019-08-13  5:52 Matthias Maier
2019-08-12  4:03 Matthias Maier
2019-08-06 10:02 Agostino Sarubbo
2019-08-06  9:39 Agostino Sarubbo
2019-08-02 19:48 Matthias Maier
2019-08-02 19:48 Matthias Maier
2019-07-30 13:44 Mike Gilbert
2019-07-09 19:06 Matthias Maier
2019-07-09 12:14 Matthias Maier
2019-07-09 12:14 Matthias Maier
2019-07-09 12:14 Matthias Maier
2019-07-02  6:31 Matthias Maier
2019-07-01 17:12 Matthias Maier
2019-07-01 15:07 Matthias Maier
2019-05-26 22:27 Thomas Deutschmann
2019-05-20 23:29 Matthias Maier
2019-05-20 11:07 Mikle Kolyada
2019-05-19 23:42 Matthias Maier
2019-05-19 23:42 Matthias Maier
2019-04-08  2:52 Matthias Maier
2019-04-08  2:52 Matthias Maier
2019-04-08  2:52 Matthias Maier
2019-04-08  2:52 Matthias Maier
2019-04-04 14:55 Matthias Maier
2019-03-17  7:27 Matthias Maier
2019-03-17  7:27 Matthias Maier
2019-03-17  7:27 Matthias Maier
2019-03-17  7:27 Matthias Maier
2019-03-17  7:27 Matthias Maier
2019-03-02 23:46 Matthias Maier
2019-01-25 16:28 Matthias Maier
2019-01-10 15:13 Doug Goldstein
2019-01-02 10:02 Mikle Kolyada
2018-12-29 19:12 Thomas Deutschmann
2018-12-18 15:50 Matthias Maier
2018-12-03  2:43 Jonathan Callen
2018-11-04 22:39 Matthias Maier
2018-11-04 22:39 Matthias Maier
2018-11-04  5:13 Matthias Maier
2018-11-04  5:13 Matthias Maier
2018-09-24 11:57 Matthias Maier
2018-09-24 11:57 Matthias Maier
2018-08-23  2:38 Mikle Kolyada
2018-08-23  1:41 Thomas Deutschmann
2018-08-19 18:54 Matthias Maier
2018-08-19 18:54 Matthias Maier
2018-07-23 16:13 Matthias Maier
2018-07-03 14:12 Matthias Maier
2018-07-03 13:13 Matthias Maier
2018-07-03  7:44 Matthias Maier
2018-07-03  7:44 Matthias Maier
2018-07-03  7:44 Matthias Maier
2018-07-01 16:52 Matthias Maier
2018-07-01 16:44 Matthias Maier
2018-06-29  4:50 Matthias Maier
2018-06-29  4:50 Matthias Maier
2018-06-05 14:52 Mikle Kolyada
2018-05-11 21:39 Matthias Maier
2018-04-14 23:50 Matthias Maier
2018-04-14 23:50 Matthias Maier
2018-04-09 16:06 Matthias Maier
2018-04-01 16:10 Aaron Bauman
2018-03-28 19:33 Matthias Maier
2018-03-20 16:48 Matthias Maier
2018-03-20 16:42 Matthias Maier
2018-03-18  0:40 Thomas Deutschmann
2018-03-15 10:03 Mikle Kolyada
2018-03-14 18:18 Matthias Maier
2018-02-12 21:36 Thomas Deutschmann
2018-02-12 11:47 Agostino Sarubbo
2018-01-30 17:55 Matthias Maier
2017-12-11  4:15 Matthias Maier
2017-12-07 16:08 Matthias Maier
2017-11-13 18:49 Manuel Rüger
2017-10-25 19:52 Matthias Maier
2017-10-25 19:48 Matthias Maier
2017-10-25 19:39 Matthias Maier
2017-09-27 15:15 Matthias Maier
2017-09-27 15:15 Matthias Maier
2017-09-27 15:15 Matthias Maier
2017-09-23 14:15 Thomas Deutschmann
2017-09-20  9:59 Agostino Sarubbo
2017-09-11 20:20 Michał Górny
2017-09-05 23:23 Matthias Maier
2017-07-26 19:37 Matthias Maier
2017-07-07 10:33 Alexis Ballier
2017-06-11 22:11 Matthias Maier
2017-06-04 10:42 Agostino Sarubbo
2017-06-04 10:34 Agostino Sarubbo
2017-05-07 10:36 Agostino Sarubbo
2017-05-07 10:34 Agostino Sarubbo
2017-05-06 18:27 Matthias Maier
2017-04-14 15:55 Matthias Maier
2017-03-17 20:25 Matthias Maier
2017-03-04 21:27 Matthias Maier
2017-01-23 15:46 Agostino Sarubbo
2017-01-23 13:51 Agostino Sarubbo
2017-01-22 22:05 Manuel Rüger
2017-01-22 16:28 Matthias Maier
2017-01-22 15:34 Matthias Maier
2017-01-20  2:43 Matthias Maier
2017-01-20  2:43 Matthias Maier
2016-12-20 12:59 Matthias Maier
2016-12-20  7:36 Yixun Lan
2016-12-09  2:16 Matthias Maier
2016-12-08 23:13 Yixun Lan
2016-12-07  7:37 Yixun Lan
2016-11-18 20:42 Matthias Maier
2016-11-18 20:42 Matthias Maier
2016-10-17  5:54 Matthias Maier
2016-10-05  3:02 Matthias Maier
2016-10-05  3:02 Matthias Maier
2016-10-04  7:14 Matthias Maier
2016-10-04  7:14 Matthias Maier
2016-09-14 21:40 Matthias Maier
2016-09-02 14:41 Matthias Maier
2016-08-16  7:38 Matthias Maier
2016-08-16  7:38 Matthias Maier
2016-08-16  7:38 Matthias Maier
2016-08-08  4:45 Matthias Maier
2016-08-08  4:45 Matthias Maier
2016-08-08  4:44 Matthias Maier
2016-07-28  1:32 Matthias Maier
2016-07-09 15:10 Matthias Maier
2016-07-09 15:10 Matthias Maier
2016-07-09 15:10 Matthias Maier
2016-07-09 15:10 Matthias Maier
2016-07-09 15:10 Matthias Maier
2016-07-09 15:10 Matthias Maier
2016-07-01  9:35 Matthias Maier
2016-07-01  8:30 Agostino Sarubbo
2016-07-01  8:29 Agostino Sarubbo
2016-06-14 10:19 Agostino Sarubbo
2016-06-14  6:32 Matthias Maier
2016-06-14  6:32 Matthias Maier
2016-06-14  5:51 Fabian Groffen
2016-05-31 21:24 Matthias Maier
2016-05-01 19:15 Matthias Maier
2016-05-01 19:15 Matthias Maier
2016-04-20  3:21 Michał Górny
2016-04-14 14:23 Doug Goldstein
2016-03-16 14:30 Doug Goldstein
2016-03-13 20:26 Matthias Maier
2016-03-11 15:09 Patrick Lauer
2016-02-03  4:32 Matthias Maier
2016-02-03  4:30 Matthias Maier
2015-12-26 23:02 Matthias Maier
2015-12-22  9:08 Agostino Sarubbo
2015-12-22  9:01 Agostino Sarubbo
2015-12-22  6:16 Matthias Maier
2015-12-22  6:16 Matthias Maier
2015-12-07  2:07 Doug Goldstein
2015-11-15  8:06 Matthias Maier
2015-10-10 16:07 Matthias Maier
2015-10-10 16:07 Matthias Maier
2015-10-04 14:07 Matthias Maier
2015-10-03 18:29 Matthias Maier
2015-10-03 18:16 Matthias Maier
2015-10-03 18:16 Matthias Maier
2015-10-03 18:16 Matthias Maier
2015-09-09 16:00 Doug Goldstein
2015-09-08  7:20 Agostino Sarubbo
2015-09-08  7:19 Agostino Sarubbo
2015-09-02 16:03 Doug Goldstein
2015-09-02 16:03 Doug Goldstein
2015-08-20  1:44 Matthias Maier
2015-08-20  1:13 Matthias Maier

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=1720715309.424908701d9854699393101d9a732cfd6a450ef7.eschwartz@gentoo \
    --to=eschwartz@gentoo.org \
    --cc=gentoo-commits@lists.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