On 08/16/2011 12:01 AM, Michał Górny wrote:
> On Mon, 15 Aug 2011 19:42:01 -0700
> Zac Medico <zmed...@gentoo.org> wrote:
> 
>> On 08/15/2011 11:41 AM, Michał Górny wrote:
>>> Hello,
>>>
>>> Now that we don't have any old-style virtuals in gx86 anymore,
>>> I think the 'virtual' category is basically one another plain
>>> category nowadays.
>>
>> In sys-apps/portage, the "virtual" category is used as a hint to the
>> dependency resolver it needs to look ahead in order to make the best
>> possible choices. For example, in order to solve bug #141118 [1], it
>> recursively expands virtual/jre and virtual/jdk in order to
>> efficiently satisfy a jre dependency with whatever jdk happens to be
>> installed, instead of pulling in a redundant jre.
> 
> Isn't that another, ugly, non-PMS hack which makes people think they
> are creating correct packages?

Are you saying that you'd prefer to have package managers pull in
redundant packages for not good reason?

Anyway, the thing that's really special about virtuals is that they can
be considered to contribute zero-cost when the package manager is trying
minimize the overall cost of satisfying a particular dependency. To
minimize cost means to eliminate redundant packages.

The relevance of virtuals in terms of cost calculations is why Ciaran
suggested to call it PROPERTIES="zero-install-cost" [1] instead of
"virtual".

>>> Considering the number of different virtuals in this category,
>>> maybe it would be a good idea to split it a little? What I'm
>>> proposing is maybe creating some kind of '*-virtual' categories.
>>>
>>> For example, half of the current virtuals are prefixed with 'perl-'.
>>> Maybe they could be transformed into 'perl-virtual/*'?
>>
>> If you're going to do that, then I'd suggest giving them some sort of
>> tag that the package manager can rely upon in order to identify them
>> as virtuals. For example, we could have the ebuilds set
>> PROPERTIES=virtual [2], or we could simply specify (in PMS) that any
>> category whose name matches the '*-virtual' pattern will contain
>> virtuals.
> 
> Doesn't DEFINED_PHASES==- serve that purpose nowadays?

That's an interesting idea. It seems like that should suffice for this
purpose.

[1]
http://archives.gentoo.org/gentoo-dev/msg_47dc8f61c43d835c3feee77244188b02.xml
-- 
Thanks,
Zac

Reply via email to