Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 935849

Summary: app-emulation/libvirt-10.5.0 fails tests: 130 libvirt:script / rpcgen-pytest FAIL 0.41s exit status 1
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Virtualization Team <virtualization>
Status: RESOLVED FIXED    
Severity: normal CC: eschwartz, michal.privoznik
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log.xz
1-testlog.txt.xz
app-emulation/libvirt: implement a correct python_check_deps

Description Agostino Sarubbo gentoo-dev 2024-07-11 08:51:35 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-emulation/libvirt-10.5.0 fails tests.
Discovered on: amd64 (internal ref: ci)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0015
Comment 1 Agostino Sarubbo gentoo-dev 2024-07-11 08:51:36 UTC
Created attachment 897439 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Agostino Sarubbo gentoo-dev 2024-07-11 08:51:38 UTC
Created attachment 897440 [details]
1-testlog.txt.xz

1-testlog.txt (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 3 Agostino Sarubbo gentoo-dev 2024-07-11 08:51:38 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


 11/130 libvirt:script / rpcgen-pytest                           FAIL             0.41s   exit status 1
 11/130 libvirt:script / rpcgen-pytest                  FAIL             0.41s   exit status 1
118/130 libvirt:bin / libvirtd fail with missing config          EXPECTEDFAIL     0.11s   exit status 1
Program augparse found: NO
Program black found: NO
Program flake8 found: NO
Program iscsiadm found: NO
Program mdevctl found: NO
Program mm-ctl found: NO
Program ovs-vsctl found: NO
Program pdwtags found: NO
Program showmount found: NO
Program slirp-helper found: NO
Run-time dependency devmapper found: NO (tried pkgconfig and cmake)
Run-time dependency fuse3 found: NO (tried pkgconfig and cmake)
Run-time dependency libiscsi found: NO (tried pkgconfig and cmake)
Run-time dependency parallels-sdk found: NO (tried pkgconfig and cmake)
/usr/bin/python3.13: No module named pytest
Comment 4 Eli Schwartz gentoo-dev 2024-07-11 15:20:27 UTC
Created attachment 897446 [details, diff]
app-emulation/libvirt: implement a correct python_check_deps

This is unrelated to the recent commit except inasmuch as bumping PYTHON_COMPAT meant that pytest was probably installed, but for something other than the latest version of python.
Comment 5 Larry the Git Cow gentoo-dev 2024-07-11 16:29:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=424908701d9854699393101d9a732cfd6a450ef7

commit 424908701d9854699393101d9a732cfd6a450ef7
Author:     Eli Schwartz <eschwartz@gentoo.org>
AuthorDate: 2024-07-11 15:14:42 +0000
Commit:     Eli Schwartz <eschwartz@gentoo.org>
CommitDate: 2024-07-11 16:28:29 +0000

    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(-)