Gentoo Archives: gentoo-dev

From: Kent Fredric <kentnl@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Reverse use of Python/Ruby versions
Date: Mon, 10 Apr 2017 22:23:33
Message-Id: 20170411102255.1e3cd645@katipo2.lan
In Reply to: Re: [gentoo-dev] Reverse use of Python/Ruby versions by "Vadim A. Misbakh-Soloviov"
1 On Tue, 11 Apr 2017 03:29:25 +0700
2 "Vadim A. Misbakh-Soloviov" <gentoo@×××.name> wrote:
3
4 > The purpose of TARGETS is that package holds only that TARGETs that it was
5 > tested to work against
6
7 Targets are more than that.
8
9 Targets also regulate compilation stage for concurrency.
10
11 For instance:
12
13 If you have 2 pythons.
14
15 Imagine you have no TARGETS
16
17
18 X depends on Y
19
20 Now, X and Y both compile against both pythons.
21
22 But you installed your packages like this:
23
24
25 python 2.7
26 Y
27 python 3.5
28 X
29
30 Thus, when "Y" was installed, only python 2.7 could be an installation candidate,
31 so it only installed against python 2.7
32
33 But now, "X" will compile against both python 2.7 and python 3.5, but horrors!...
34
35 Python 3.5 doesn't have Y!
36
37 Portage has no way of knowing this.
38
39 introduce targets.
40
41 install python 2.7
42 install Y with TARGETS='python2.7'
43 install python 3.5
44 install X with TARGETS='python2.7' # no problem, because it doesn't try to compile against 3.5
45
46 But then you decide you wanted python 3.5 support after all
47
48 TARGETS="python3.5"
49
50 Install X
51
52 X[python3.5] requires Y[python3.5]
53
54 Portage recognizes Y doesn't have python3.5 , and forces the useflag change and a recompile before installing X with python3.5
55
56 THIS IS WHY WE HAVE THIS.
57
58 The only reason this is "hell" is because users end up having to flip those toggles or set them globally, instead of portage intelligently
59 auto-setting them on an as-needed basis.
60
61 In essence, users have to micro-manage every portage decision, even though portage is making the decisions and the user is just bitching and rubber stamping it ;)