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

Bug 480412

Summary: app-emulation/qemu[-python] should not require PYTHON_TARGETS
Product: Gentoo Linux Reporter: Maciej Piechotka <uzytkownik2>
Component: Current packagesAssignee: Doug Goldstein (RETIRED) <cardoe>
Status: RESOLVED DUPLICATE    
Severity: normal CC: python, qemu+disabled
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Maciej Piechotka 2013-08-09 18:31:13 UTC
When compiling app-emulation/qemu[-python] the PYTHON_TARGETS is still required:

 * No Python implementation selected for the build. Please add one
 * of the following values to your PYTHON_TARGETS (in make.conf):
 * 
 * python2_5 python2_6 python2_7

 * ERROR: app-emulation/qemu-1.5.2-r1::gentoo failed (setup phase):
 *   No supported Python implementation in PYTHON_TARGETS.
 *
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2013-08-12 01:22:44 UTC
@python: Alright guys. What'd I do wrong in the ebuild? We still need Python 2.5, 2.6 or 2.7 to compile QEMU but when the user has USE=-python, we don't need a RDEPEND on it for the installed scripts.
Comment 2 Mike Gilbert gentoo-dev 2013-08-12 02:50:58 UTC
(In reply to Doug Goldstein from comment #1)

python-r1 doesn't really deal with this situation optimally. We would need to borrow some functionality from python-any-r1 to make this work the way the requester wants.

That would be tricky to implement, so I suggest the following patch as an alternative. This will force the user to set PYTHON_TARGETS via REQUIRED_USE, and will utilize that value in DEPEND. Runtime deps remain unchanged.

Index: qemu-1.5.2-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-1.5.2-r1.ebuild,v
retrieving revision 1.1
diff -u -r1.1 qemu-1.5.2-r1.ebuild
--- qemu-1.5.2-r1.ebuild        3 Aug 2013 19:47:09 -0000       1.1
+++ qemu-1.5.2-r1.ebuild        12 Aug 2013 02:48:25 -0000
@@ -58,7 +58,7 @@
 
 # Block USE flag configurations known to not work
 REQUIRED_USE="${REQUIRED_USE}
-       python? ( ${PYTHON_REQUIRED_USE} )
+       ${PYTHON_REQUIRED_USE}
        static? ( static-softmmu static-user )
        static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk )
        virtfs? ( xattr )"
@@ -122,7 +122,7 @@
 
 DEPEND="${RDEPEND}
        dev-lang/perl
-       =dev-lang/python-2*
+       ${PYTHON_DEPS}
        sys-apps/texinfo
        virtual/pkgconfig
        kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-08-12 08:02:30 UTC
What Mike said. Though I'd disagree that it's not optimal. It nearly boils down to the same result on most systems.
Comment 4 SpanKY gentoo-dev 2014-04-19 16:59:58 UTC
duping to newer version as we've already sorted out a way forward & committed things there

*** This bug has been marked as a duplicate of bug 496554 ***