1 |
On Sun, Jun 06, 2010 at 01:03:48AM +0200, Thomas Sachau wrote: |
2 |
> Am 05.06.2010 20:31, schrieb Harald van Dijk: |
3 |
> > On Sat, Jun 05, 2010 at 05:49:08PM +0200, Thomas Sachau wrote: |
4 |
> >> If any package does inherit python or distutils eclass, then those eclasses do pull in |
5 |
> >> "dev-lang/python", which is unversioned, so it will always pull in the latest version, in this case |
6 |
> >> python-3*. You could change this, so it allows any major installed slot to satisfy the python |
7 |
> >> dependency. |
8 |
> > |
9 |
> > A dependency on dev-lang/python *is* satisfied by any slot, any version. You've |
10 |
> > been told so already, if I recall correctly. |
11 |
> |
12 |
> Every slot and every version *should* satisfy a "dev-lang/python" dependency, but currently such |
13 |
> unspecified version dependency does automaticly pull in the latest version/slot, which in case of |
14 |
> python does mean python-3*, even when you have e.g. python:2.6 installed. |
15 |
|
16 |
Fine, I'll be as explicit as possible: not quite. I have a Python 3-free system. I created |
17 |
a dummy ebuild that does nothing but pull in unversioned python. Let's |
18 |
see how it behaves. |
19 |
|
20 |
$ emerge -pv python |
21 |
|
22 |
These are the packages that would be merged, in order: |
23 |
|
24 |
Calculating dependencies... done! |
25 |
[ebuild NS ] dev-lang/python-3.1.2-r3 [2.6.5-r2] USE="gdbm ipv6 ncurses readline sqlite ssl threads tk (wide-unicode) xml -build -doc -examples -wininst" ELIBC="(-uclibc)" 9,558 kB |
26 |
|
27 |
$ cat test-2.0.ebuild |
28 |
KEYWORDS="~amd64" |
29 |
SLOT="0" |
30 |
DEPEND="dev-lang/python" |
31 |
|
32 |
$ emerge -pv test |
33 |
|
34 |
These are the packages that would be merged, in order: |
35 |
|
36 |
Calculating dependencies... done! |
37 |
[ebuild N ] test/test-2.0 0 kB [1] |
38 |
|
39 |
Total: 1 package (1 new), Size of downloads: 0 kB |
40 |
Portage tree and overlays: |
41 |
[0] /usr/portage |
42 |
[1] /etc/portage/overlay |
43 |
|
44 |
Note how python 3 is *not* pulled in, despite an unversioned dependency on dev-lang/python. |
45 |
You only get that if you tell portage to try and update dependencies as |
46 |
well, and yes, if you do that, it's only fair that it attempts to update python. |