Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: splitting virtual/
Date: Tue, 16 Aug 2011 07:20:23
Message-Id: 4E4A1A0A.6020600@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: splitting virtual/ by "Michał Górny"
1 On 08/16/2011 12:01 AM, Michał Górny wrote:
2 > On Mon, 15 Aug 2011 19:42:01 -0700
3 > Zac Medico <zmedico@g.o> wrote:
4 >
5 >> On 08/15/2011 11:41 AM, Michał Górny wrote:
6 >>> Hello,
7 >>>
8 >>> Now that we don't have any old-style virtuals in gx86 anymore,
9 >>> I think the 'virtual' category is basically one another plain
10 >>> category nowadays.
11 >>
12 >> In sys-apps/portage, the "virtual" category is used as a hint to the
13 >> dependency resolver it needs to look ahead in order to make the best
14 >> possible choices. For example, in order to solve bug #141118 [1], it
15 >> recursively expands virtual/jre and virtual/jdk in order to
16 >> efficiently satisfy a jre dependency with whatever jdk happens to be
17 >> installed, instead of pulling in a redundant jre.
18 >
19 > Isn't that another, ugly, non-PMS hack which makes people think they
20 > are creating correct packages?
21
22 Are you saying that you'd prefer to have package managers pull in
23 redundant packages for not good reason?
24
25 Anyway, the thing that's really special about virtuals is that they can
26 be considered to contribute zero-cost when the package manager is trying
27 minimize the overall cost of satisfying a particular dependency. To
28 minimize cost means to eliminate redundant packages.
29
30 The relevance of virtuals in terms of cost calculations is why Ciaran
31 suggested to call it PROPERTIES="zero-install-cost" [1] instead of
32 "virtual".
33
34 >>> Considering the number of different virtuals in this category,
35 >>> maybe it would be a good idea to split it a little? What I'm
36 >>> proposing is maybe creating some kind of '*-virtual' categories.
37 >>>
38 >>> For example, half of the current virtuals are prefixed with 'perl-'.
39 >>> Maybe they could be transformed into 'perl-virtual/*'?
40 >>
41 >> If you're going to do that, then I'd suggest giving them some sort of
42 >> tag that the package manager can rely upon in order to identify them
43 >> as virtuals. For example, we could have the ebuilds set
44 >> PROPERTIES=virtual [2], or we could simply specify (in PMS) that any
45 >> category whose name matches the '*-virtual' pattern will contain
46 >> virtuals.
47 >
48 > Doesn't DEFINED_PHASES==- serve that purpose nowadays?
49
50 That's an interesting idea. It seems like that should suffice for this
51 purpose.
52
53 [1]
54 http://archives.gentoo.org/gentoo-dev/msg_47dc8f61c43d835c3feee77244188b02.xml
55 --
56 Thanks,
57 Zac

Replies

Subject Author
Re: [gentoo-dev] RFC: splitting virtual/ Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>