1 |
Am 06.06.2010 01:38, schrieb Harald van Dijk: |
2 |
> On Sun, Jun 06, 2010 at 01:03:48AM +0200, Thomas Sachau wrote: |
3 |
>> Am 05.06.2010 20:31, schrieb Harald van Dijk: |
4 |
>>> On Sat, Jun 05, 2010 at 05:49:08PM +0200, Thomas Sachau wrote: |
5 |
>>>> If any package does inherit python or distutils eclass, then those eclasses do pull in |
6 |
>>>> "dev-lang/python", which is unversioned, so it will always pull in the latest version, in this case |
7 |
>>>> python-3*. You could change this, so it allows any major installed slot to satisfy the python |
8 |
>>>> dependency. |
9 |
>>> |
10 |
>>> A dependency on dev-lang/python *is* satisfied by any slot, any version. You've |
11 |
>>> been told so already, if I recall correctly. |
12 |
>> |
13 |
>> Every slot and every version *should* satisfy a "dev-lang/python" dependency, but currently such |
14 |
>> unspecified version dependency does automaticly pull in the latest version/slot, which in case of |
15 |
>> python does mean python-3*, even when you have e.g. python:2.6 installed. |
16 |
> |
17 |
> Fine, I'll be as explicit as possible: not quite. I have a Python 3-free system. I created |
18 |
> a dummy ebuild that does nothing but pull in unversioned python. Let's |
19 |
> see how it behaves. |
20 |
> |
21 |
> $ emerge -pv python |
22 |
> |
23 |
> These are the packages that would be merged, in order: |
24 |
> |
25 |
> Calculating dependencies... done! |
26 |
> [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 |
27 |
> |
28 |
> $ cat test-2.0.ebuild |
29 |
> KEYWORDS="~amd64" |
30 |
> SLOT="0" |
31 |
> DEPEND="dev-lang/python" |
32 |
> |
33 |
> $ emerge -pv test |
34 |
> |
35 |
> These are the packages that would be merged, in order: |
36 |
> |
37 |
> Calculating dependencies... done! |
38 |
> [ebuild N ] test/test-2.0 0 kB [1] |
39 |
> |
40 |
> Total: 1 package (1 new), Size of downloads: 0 kB |
41 |
> Portage tree and overlays: |
42 |
> [0] /usr/portage |
43 |
> [1] /etc/portage/overlay |
44 |
> |
45 |
> Note how python 3 is *not* pulled in, despite an unversioned dependency on dev-lang/python. |
46 |
> You only get that if you tell portage to try and update dependencies as |
47 |
> well, and yes, if you do that, it's only fair that it attempts to update python. |
48 |
> |
49 |
> |
50 |
|
51 |
And you do want to update world with all the dependencies of it, so even if it is not pulled in |
52 |
during installation, it will be pulled in during world update. |
53 |
|
54 |
Since python-3* is currently useless and not required for any package, the dependency should by |
55 |
default only pull in python-2* like this: |
56 |
|
57 |
=dev-lang/python-2* |
58 |
|
59 |
With that, the default way would not pull in a package, which is not needed or used. And if there |
60 |
will be any package, which really requires python-3*, it simply requests it in (R)DEPEND of the |
61 |
ebuild, which then would overwrite the default value of the eclass and pull in python-3*. |
62 |
|
63 |
Are there any reasons to pull in a package, which is not requested by the user, not required by any |
64 |
package and by default not used by any package? |
65 |
|
66 |
|
67 |
|
68 |
-- |
69 |
Thomas Sachau |
70 |
|
71 |
Gentoo Linux Developer |