Gentoo Archives: gentoo-dev

From: Thomas Sachau <tommy@g.o>
To: gentoo-dev@l.g.o
Cc: Sebastian Pipping <sping@g.o>, Gentoo Python Project <python@g.o>
Subject: Re: [gentoo-dev] [rfc] Sane defaults for USE_PYTHON, patch to python eclass
Date: Sat, 04 Dec 2010 15:36:00
Message-Id: 4CFA607A.9040709@gentoo.org
In Reply to: [gentoo-dev] [rfc] Sane defaults for USE_PYTHON, patch to python eclass by Sebastian Pipping
1 Am 04.12.2010 01:23, schrieb Sebastian Pipping:
2 > Hello!
3 >
4 >
5 > Current situation
6 > =================
7 > Without specifying USE_PYTHON in /etc/make.conf ebuilds based on the
8 > python eclass will install packages for no more ABIs than the two active
9 > versions on the 2.x and 3.x lines. To give an example: with Python 2.6,
10 > 2.7 and 3.1 installed and 2.7 set as the active 2.x Python version I
11 > would get files installed for python 2.7 and 3.1, but not 2.6.
12 >
13 > Is that a sane default? Especially when a new slot of Python arrives at
14 > the Gentoo tree, you run into situations with two slots of Python 2.x
15 > installed. To have packages functioning with both, you would need a
16 > custom USE_PYTHON line like USE_PYTHON="2.6 2.7" - otherwise one of
17 > these slots' Python will be very limited.
18 >
19 > This problem is made worse by the fact that USE_PYTHON has almost no
20 > documentation. This bug shows well, that the current behavior is a
21 > surprising troublemaker:
22 >
23 > https://bugs.gentoo.org/show_bug.cgi?id=347153
24
25 I think, the complete python code, behaviour and eclass is way too complicated to easily manage or
26 even understand it. E.g. why do we need 2 active versions by default? If i set e.g. python-2.6 as
27 default, i want everything to be installed for that and using it by default, unless i specify
28 something different. Nothing for python-2.7, nothing for python-3.1 or any other python version.
29
30 And USE_PYTHON is the wrong way to handle this. It is invisible, it only controls global settings
31 and together with other parts of the python eclass, it hides the dependency tree, so with
32 USE_PYTHON="2.6 2.7", all packages depend on both python versions, but the package manager does not
33 know about it.
34
35 I propose a package manager based solution just like the one i proposed and prepared for different
36 arches and crosscompilation. It is visible, easy to see and understand, allows per package control
37 and does leave the control to the package manager including the informations like the dependency tree.
38
39 >
40 >
41 > Proposed new situation
42 > ======================
43 > If I have a version of Python installed, it should be usable well.
44 > So USE_PYTHON is derived from the list of all available Python slots.
45 > Excluded are ABIs restricted by an ebuild, say by a line like
46 >
47 > RESTRICT_PYTHON_ABIS="3.*"
48 >
49 > for software that does not build with Python 3.x.
50
51 I am against this proposal. I already masked python-3* on my system, because no package actually
52 needs it, but the current behaviour installs completly useless code for those versions. Same would
53 happen for all other, not active versions of python. One default active version should be enough, if
54 i want more, i can select and set it.
55
56 --
57 Thomas Sachau
58
59 Gentoo Linux Developer

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies