Am 06.06.2010 01:38, schrieb Harald van Dijk:
> On Sun, Jun 06, 2010 at 01:03:48AM +0200, Thomas Sachau wrote:
>> Am 05.06.2010 20:31, schrieb Harald van Dijk:
>>> On Sat, Jun 05, 2010 at 05:49:08PM +0200, Thomas Sachau wrote:
>>>> If any package does inherit python or distutils eclass, then those 
>>>> eclasses do pull in
>>>> "dev-lang/python", which is unversioned, so it will always pull in the 
>>>> latest version, in this case
>>>> python-3*. You could change this, so it allows any major installed slot to 
>>>> satisfy the python
>>>> dependency.
>>>
>>> A dependency on dev-lang/python *is* satisfied by any slot, any version. 
>>> You've
>>> been told so already, if I recall correctly.
>>
>> Every slot and every version *should* satisfy a "dev-lang/python" 
>> dependency, but currently such
>> unspecified version dependency does automaticly pull in the latest 
>> version/slot, which in case of
>> python does mean python-3*, even when you have e.g. python:2.6 installed.
> 
> Fine, I'll be as explicit as possible: not quite. I have a Python 3-free 
> system. I created
> a dummy ebuild that does nothing but pull in unversioned python. Let's
> see how it behaves.
> 
> $ emerge -pv python
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [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
> 
> $ cat test-2.0.ebuild 
> KEYWORDS="~amd64"
> SLOT="0"
> DEPEND="dev-lang/python"
> 
> $ emerge -pv test
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [ebuild  N    ] test/test-2.0  0 kB [1]
> 
> Total: 1 package (1 new), Size of downloads: 0 kB
> Portage tree and overlays:
>  [0] /usr/portage
>  [1] /etc/portage/overlay
> 
> Note how python 3 is *not* pulled in, despite an unversioned dependency on 
> dev-lang/python.
> You only get that if you tell portage to try and update dependencies as
> well, and yes, if you do that, it's only fair that it attempts to update 
> python.
> 
> 

And you do want to update world with all the dependencies of it, so even if it 
is not pulled in
during installation, it will be pulled in during world update.

Since python-3* is currently useless and not required for any package, the 
dependency should by
default only pull in python-2* like this:

=dev-lang/python-2*

With that, the default way would not pull in a package, which is not needed or 
used. And if there
will be any package, which really requires python-3*, it simply requests it in 
(R)DEPEND of the
ebuild, which then would overwrite the default value of the eclass and pull in 
python-3*.

Are there any reasons to pull in a package, which is not requested by the user, 
not required by any
package and by default not used by any package?



-- 
Thomas Sachau

Gentoo Linux Developer

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to