On 03/05/2010 11:26 AM, Duncan wrote:
> Zac Medico posted on Fri, 05 Mar 2010 03:24:29 -0800 as excerpted:
> 
>> On 03/05/2010 03:09 AM, Maciej Mrozowski wrote:
>>> Now on more serious note, ideally python could be treated just like any
>>> other non-leaf package (in dependency tree), just like library. In such
>>> case it's completely reasonable to stabilize the newest version of such
>>> 'library', especially when it's slotted and doesn't conflict in any way
>>> with the rest. However, because of being used by package manager,
>>> python is leaf application really and it's going to be immediately
>>> pulled for everyone.
>>
>> It won't be pulled in by sys-apps/portage dependencies which look like
>> this:
>>
>>  || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6
>>> =dev-lang/python-3 )
>>
>> If you already have python:2.6 installed then it will not pull in a new
>> slot.
> 
> Won't emerge -aNuD pull it in anyway, even in a new slot, since portage 
> says it can use it?  I know I use that, so I'm always updated all the way 
> thru the system, not just at the leaves.

No, it won't. To prove it, I've just tested with a stable stage3
containing portage-2.1.7.x. Here are the steps:

1) extract stable stage3 and chroot into it
2) mkdir /etc/portage && echo "dev-lang/python ~*" >>
/etc/portage/package.keywords
3) Run `emerge -pu --deep=1 portage`:
   These are the packages that would be merged, in order:

   Calculating dependencies... done!
   [ebuild     UD] sys-apps/sandbox-1.6-r2 [2.2]
   [ebuild     UD] app-shells/bash-4.0_p35 [4.0_p37]
   [ebuild     U ] dev-lang/python-2.6.4-r1 [2.6.4]

If you try `emerge -puD world` then you will see
dev-lang/python-3.1.1-r1 pulled in by the unspecific dev-lang/python
atoms in the cracklib and libxml2 dependencies. However, in
portage-2.1.7.x (current stable), there is support for
pseudo-version-ranges in dependencies. This allows you use a
dependency like <dev-lang/python-3 in a package that doesn't support
python3, and that will prevent it from getting pulled into the
dependency graph.
-- 
Thanks,
Zac

Reply via email to