Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 897446 Details for
Bug 935849
app-emulation/libvirt-10.5.0 fails tests: 130 libvirt:script / rpcgen-pytest FAIL 0.41s exit status 1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
app-emulation/libvirt: implement a correct python_check_deps
0001-app-emulation-libvirt-implement-a-correct-python_che.patch (text/plain), 4.74 KB, created by
Eli Schwartz
on 2024-07-11 15:20:27 UTC
(
hide
)
Description:
app-emulation/libvirt: implement a correct python_check_deps
Filename:
MIME Type:
Creator:
Eli Schwartz
Created:
2024-07-11 15:20:27 UTC
Size:
4.74 KB
patch
obsolete
>From 46722323e9f58d810347db3148e34478e8462629 Mon Sep 17 00:00:00 2001 >From: Eli Schwartz <eschwartz@gentoo.org> >Date: Thu, 11 Jul 2024 11:14:42 -0400 >Subject: [PATCH] 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@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() { >-- >2.44.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 935849
:
897439
|
897440
| 897446