Gentoo Archives: gentoo-dev

From: Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Virtuals - required?
Date: Mon, 28 Jun 2004 16:47:07
Message-Id: 20040628184744.57eb0899@eusebe
In Reply to: Re: [gentoo-dev] Virtuals - required? by Jason Stubbs
1 On Mon, 28 Jun 2004 22:02:24 +0900
2 Jason Stubbs <jstubbs@g.o> wrote:
3
4 > > "|| ( >=virtual/linux-sources-2.6 media-libs/alsa-lib )
5 > > ( || ( media-sound/alsa-driver
6 > > >=virtual/linux-sources-2.6 )
7 > > media-libs/alsa-lib )"
8
9 Oops, what i actually meant was :
10 "|| ( ( >=virtual/linux-sources-2.6 media-libs/alsa-lib )
11 ( || ( media-sound/alsa-driver
12 >=virtual/linux-sources-2.6 )
13 media-libs/alsa-lib ) )"
14
15 >From $RDEPEND and $USER_PREFS, one would create:
16 NEW_RDEPEND="|| ( $USER_PREFS
17 ( $RDEPEND ) )"
18
19 > Actually, you're example above reminded me of bug #25013.
20 > Specifically the comments toward the end relating to the
21 > kde.eclass. As these meta-packages are versionable, this scheme
22 > would be perfect to handle that (and probably a whole lot of
23 > other simple eclasses as well).
24
25 You mean, depending on a metaebuild instead of adding some deps
26 from an eclass? If that's so, agreed, that makes sense.
27
28 > Dependencies of system packages that aren't listed in system
29 > would also be exempted.
30
31 True.
32
33 > My current implementation of this feature in the API (the end
34 > goal is all logic in emerge being out and reimplemented) scans
35 > each atom in system and checks if the package to be merged
36 > matches it.
37
38 Sounds perfect. By curosity, how is the cost of this check?
39 (and do you cache the result of this system deps tree
40 calculation, to reuse it for the next ebuild?)
41
42 > > A maybe more important one if PROVIDES disappears is that you
43 > > loose some convenient shortcuts when using eclasses. For
44 > > instance, for kernel sources, the eclass has
45 > > PROVIDES=virtual/kernel
46 >
47 > True...
48
49 This makes me think about an intermediate solution:
50 - keep the current PROVIDE in ebuilds syntax, and "virtuals" file
51 in profile
52 - makes emerge generates a set of virtual metaebuilds each time
53 it rsyncs (using this PROVIDE information plus the virtuals file
54 in profile)
55
56 In terms of fonctionnalities, this system would be almost
57 equivalent to what currently exists in portage:
58 - no need for a kernel dev to edit virtual/kernel.ebuild each
59 time he makes a new kernel available
60 - PROVIDE in eclasses would still be possible
61 - virtuals would be only some lists of alternatives, just like it
62 is currently
63 - an ordering of this alternatives can be specified at profile
64 level profile
65
66 Some elements of comparaison with your proposal:
67 - it would be less expressive (no more virtuals depending on
68 sets of packages for instances), but imho this simplicity is also
69 a good thing
70 - it would be almost equivalent in terms of code. The handling in
71 deps calulation is just the same, and hence it would bring the
72 same speedup and simplifications. The only difference is the
73 metaebuilds generator to write, but i don't see major difficulty
74 here
75 - it would need the cache format change that you were avoiding
76 - virtual versioning also is possible in this scheme
77
78 Well, i'm not sure how good or bad is the idea, it came while
79 writing this mail, so i've not thought much about it yet.
80
81 > > (and a few other like this, some of which are conditional,
82 > > etc.).
83 >
84 > That behaviour is actually broken.
85
86 In the case of kernel.eclass, i think it's working correctly
87 because the conditions are actually about some statically defined
88 variables($KV and $ETYPE). Thus, for a given ebuild, it will
89 always evaluate the same whatever the user config is.
90 At least, this is true as long as bash is used to retrieve this
91 values. I think i've read that other simpler but faster parsers
92 may be used in the future, in which case such bash constructions
93 would become an issue.
94
95
96 > Thanks for this discussion, by the way.
97
98 My pleasure :) I like to brainstorm a bit around portage, i just
99 regret i don't currently have time to also participate with
100 code... Btw, if you want to continue this discussion, be patient
101 cause i will be offline next two or three days.
102
103 Regards,
104
105 --
106 TGL.
107
108 --
109 gentoo-dev@g.o mailing list