Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 516772 - app-emulation/lxc-1.0.4: requires any of python 3.* implementations even with USE="-python"
Summary: app-emulation/lxc-1.0.4: requires any of python 3.* implementations even with...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-09 14:02 UTC by Sergey Popov
Modified: 2014-10-18 17:00 UTC (History)
5 users (show)

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


Attachments
Ebuild patch (lxc.patch,872 bytes, patch)
2014-10-18 16:40 UTC, Mike Gilbert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Popov gentoo-dev 2014-07-09 14:02:35 UTC
As per summary. Please, clarify if DISTUTILS_OPTIONAL=1 and apropriate constructions like

DEPEND="${PYTHON_DEPS}"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

can be used.

It's vitally needed on systems which is currently running only Python 2.*
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2014-07-22 18:46:11 UTC
I know zero things about the python classes.

According to

https://github.com/lxc/lxc/blob/master/configure.ac

the lxc seems to need python3 when python is enabled but I am not exactly sure how to express that to the ebuild. CC'ing python for suggestions
Comment 2 Sergey Popov gentoo-dev 2014-07-23 12:20:38 UTC
That should handle it. All other things: proper python deps, dependending on enabled python USE flag AND apropriate REQUIRED_USE is already in place.

--- lxc-1.0.4.ebuild    2014-06-15 22:29:53.000000000 +0400
+++ lxc-1.0.4-r1.ebuild 2014-07-23 16:19:57.000000000 +0400
@@ -6,7 +6,7 @@
 
 MY_P="${P/_/-}"
 PYTHON_COMPAT=( python{3_2,3_3,3_4} )
-
+DISTUTILS_OPTIONAL=1
 inherit autotools distutils-r1 eutils linux-info versionator flag-o-matic systemd
 
 DESCRIPTION="LinuX Containers userspace utilities"
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-23 15:57:38 UTC
As a note, I think you can remove python-related code from pkg_setup() and just pass --disable-python instead of enabling and cleaning up the Makefile ;). Looking at configure.ac&Makefile.am, --enable-python only enables calling setup.py in that Makefile... which you don't want anyway.
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2014-07-23 17:00:46 UTC
(In reply to Michał Górny from comment #3)
> As a note, I think you can remove python-related code from pkg_setup() and
> just pass --disable-python instead of enabling and cleaning up the Makefile
> ;). Looking at configure.ac&Makefile.am, --enable-python only enables
> calling setup.py in that Makefile... which you don't want anyway.

Hmm what pkg_setup() ?

I remember there was a reason I did it this way which I have completely forgot right now :/
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2014-10-18 16:22:31 UTC
@python can you help me with that?
Comment 6 Mike Gilbert gentoo-dev 2014-10-18 16:40:43 UTC
Created attachment 386896 [details, diff]
Ebuild patch

(In reply to Markos Chandras from comment #5)
> @python can you help me with that?

I took a look, and it seems like the only change necessary is setting DISTUTILS_OPTIONAL=1 before inherit, as Sergey suggests.

I think mgorny's suggestion is something like the attached patch.
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2014-10-18 17:00:32 UTC
Thanks. Fixed in 1.0.6