1 |
Mike Gilbert schrieb: |
2 |
> On Mon, Jul 30, 2012 at 3:36 AM, Dirkjan Ochtman <djc@g.o> wrote: |
3 |
>> I agree that installing both is probably overkill for most users. I |
4 |
>> think the solution is somewhere outside the dev-lang/python package, |
5 |
>> though, in having the system set or portage or whatever the hell it is |
6 |
>> that first pulls in python prefer python-2. |
7 |
> |
8 |
> I looked into this, and there are currently two things that will pull |
9 |
> python-3 into a stage3: |
10 |
> |
11 |
> 1. sys-apps/portage due to its >=dev-lang/python-2.7[ssl] dependency. |
12 |
> 2. app-admin/python-updater has a bare "dev-lang/python" dependency. |
13 |
> |
14 |
> I have verified that if you install python:2.7, and adjust those |
15 |
> dependencies to the following, portage will no longer try to pull in |
16 |
> python-3.2 on a world update. |
17 |
> |
18 |
> sys-apps/portage: |
19 |
> |
20 |
> DEPEND="|| ( =dev-lang/python-3*[ssl] dev-lang/python:2.7[ssl] |
21 |
> dev-lang/python:2.6[threads,ssl] )" |
22 |
> |
23 |
> app-admin/python-updater: |
24 |
> |
25 |
> DEPEND="|| ( dev-lang/python-3* dev-lang/python-2* )" |
26 |
> |
27 |
> The || deps are key here; this causes portage to weight an already |
28 |
> installed package over the rest. |
29 |
> |
30 |
> In fact, if you reverse the order of python-3 and python-2, that |
31 |
> SHOULD cause python-2 to be pulled into the stage building process |
32 |
> instead of python-3. |
33 |
> |
34 |
> So, another possible alternative here is to scour the tree, replacing |
35 |
> any dependencies on dev-lang/python with || deps. I believe |
36 |
> python.eclass would also need to be updated. Does that sound like an |
37 |
> acceptable solution? |
38 |
> |
39 |
> |
40 |
|
41 |
If this prevents python-3 to be pulled in also python-2 does still |
42 |
satisfies all requirements (for stage3 and for updates), then this looks |
43 |
like an acceptable solution with less work. It would also mean, that |
44 |
PYTHON_TARGETS could again just go with python2_7. |
45 |
|
46 |
The only drawback i see with this solution is, that python dependencies |
47 |
need to be done carefully, so that noone does accidently pull python-3 |
48 |
in again at some later point. |
49 |
|
50 |
-- |
51 |
|
52 |
Thomas Sachau |
53 |
Gentoo Linux Developer |