Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 496554 - app-emulation/qemu-1.6.1 - dies in pkg_setup when all python targets are disabled
Summary: app-emulation/qemu-1.6.1 - dies in pkg_setup when all python targets are disa...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
: 480412 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-31 02:02 UTC by Rafal Kupiec
Modified: 2014-09-26 15:44 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafal Kupiec 2013-12-31 02:02:41 UTC
QEMU requires python 2, even when USE=-python is set. What is more it forces to install older version of python when not necessary. Ebuild should depend on python only when this USE flag is enabled, or at least be happy from Python3 which is installed.,,



[ebuild  N     ] app-emulation/qemu-1.6.1  USE="aio caps curl fdt filecaps jpeg ncurses png seccomp threads uuid vhost-net vnc -accessibility -alsa -bluetooth -debug -glusterfs -gtk -iscsi -mixemu -opengl -pulseaudio -python -rbd -sasl -sdl (-selinux) -smartcard -spice -ssh -static -static-softmmu -static-user -systemtap -tci {-test} -tls -usb -usbredir -vde -virtfs -xattr -xen -xfs" PYTHON_TARGETS="-python2_6 -python2_7" QEMU_SOFTMMU_TARGETS="x86_64 -alpha -arm -cris -i386 -lm32 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -moxie -or32 -ppc -ppc64 -ppcemb -s390x -sh4 -sh4eb -sparc -sparc64 -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="x86_64 -alpha -arm -armeb -cris -i386 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -or32 -ppc -ppc64 -ppc64abi32 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -unicore32" 11,768 kB




 * qemu-1.6.1-452f0d87.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                          [ ok ]
 * Adding group 'kvm' to your system ...
 *  - Groupid: 78
 * No Python implementation selected for the build. Please add one
 * of the following values to your PYTHON_TARGETS (in make.conf):
 * 
 * python2_6 python2_7

 * ERROR: app-emulation/qemu-1.6.1::gentoo failed (setup phase):
 *   No supported Python implementation in PYTHON_TARGETS.
 * 
 * Call stack:
 *           ebuild.sh, line  93:  Called pkg_setup
 *   qemu-1.6.1.ebuild, line 230:  Called python_export_best
 *    python-r1.eclass, line 744:  Called _python_obtain_impls
 *    python-r1.eclass, line 639:  Called _python_validate_useflags
 *    python-r1.eclass, line 246:  Called die
 * The specific snippet of code:
 *      die "No supported Python implementation in PYTHON_TARGETS."
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-1.6.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-1.6.1::gentoo'`.
 * The complete build log is located at '/var/log/portage/app-emulation:qemu-1.6.1:20131231-014141.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-emulation/qemu-1.6.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qemu-1.6.1/temp/die.env'.
 * Working directory: '/usr/lib64/portage/pym'
 * S: '/var/tmp/portage/app-emulation/qemu-1.6.1/work/qemu-1.6.1'
Comment 1 Mike Gilbert gentoo-dev 2013-12-31 15:39:33 UTC
I'm pretty sure this is not a bug; the ebuild calls python_export_best, which implies that python is needed to build the package.

However, it could be argued that the python_export_best call should be moved to src_configure so that binpkgs work properly.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2014-01-02 16:01:39 UTC
(In reply to Rafal Kupiec from comment #0)
> QEMU requires python 2, even when USE=-python is set. What is more it forces
> to install older version of python when not necessary. Ebuild should depend
> on python only when this USE flag is enabled, or at least be happy from
> Python3 which is installed.,,
> 

So Python isn't optional to build QEMU. There are two depends on Python in the package, a build time depend and an optional runtime depend. You must have Python 2 to actually build and compile QEMU. The USE flag is for optional Python scripts which would provide a runtime depend on Python as well.

(In reply to Mike Gilbert from comment #1)
> I'm pretty sure this is not a bug; the ebuild calls python_export_best,
> which implies that python is needed to build the package.
> 
> However, it could be argued that the python_export_best call should be moved
> to src_configure so that binpkgs work properly.

We could do that so binpkgs wouldn't need the build time depend on Python. Would that export last into the src_compile phase?
Comment 3 Mike Gilbert gentoo-dev 2014-01-02 16:15:12 UTC
Yes, it would.
Comment 5 SpanKY gentoo-dev 2014-04-19 16:59:58 UTC
*** Bug 480412 has been marked as a duplicate of this bug. ***
Comment 6 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2014-09-26 15:10:02 UTC
This is cropping up again/still with qemu-2.1.1

 * No Python implementation selected for the build. Please add one
 * of the following values to your PYTHON_TARGETS (in make.conf):
 * 
 * python2_6 python2_7
 * ERROR: app-emulation/qemu-2.1.1::gentoo failed (configure phase):
 *   No supported Python implementation in PYTHON_TARGETS.
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_configure
 *   environment, line 5297:  Called python_export_best
 *   environment, line 4515:  Called _python_obtain_impls
 *   environment, line 1040:  Called _python_validate_useflags
 *   environment, line 1096:  Called die
 * The specific snippet of code:
 *       die "No supported Python implementation in PYTHON_TARGETS."


I'm not sure how that constitutes as fixed. Sure, its easy enough to just set the damned field, but it would be better if that check happened during dependency resolution, not in the middle of an emerge world.
Comment 7 Mike Gilbert gentoo-dev 2014-09-26 15:44:32 UTC
+  26 Sep 2014; Mike Gilbert <floppym@gentoo.org> qemu-2.1.1.ebuild,
+  qemu-9999.ebuild:
+  Utilize PYTHON_REQUIRED_USE unconditionally. We always need at least one
+  python version enabled for building.