1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
On Monday 28 June 2004 10:43, Thomas de Grenier de Latour wrote: |
5 |
> RDEPEND="|| ( media-sound/alsa-driver |
6 |
> >=virtual/linux-sources-2.6 ) |
7 |
> media-libs/alsa-lib" |
8 |
> Then the user who wants his driver to be provided by kernel2.6 |
9 |
> should probably write this in is virtuals file: |
10 |
> virtual/alsa \ |
11 |
> ( >=virtual/linux-sources-2.6 media-libs/alsa-lib ) |
12 |
> so that the RDEPEND is transformed into: |
13 |
> "|| ( >=virtual/linux-sources-2.6 media-libs/alsa-lib ) |
14 |
> ( || ( media-sound/alsa-driver |
15 |
> >=virtual/linux-sources-2.6 ) |
16 |
> media-libs/alsa-lib )" |
17 |
> |
18 |
> Imho that's a bit too complicated, that's why i think |
19 |
> expressiveness should be limited to a global disjonction. That |
20 |
> said, it may be done by policy instead of being enforced by |
21 |
> the code. |
22 |
|
23 |
We're also trying to prevent portage relying on policy. Policies require a |
24 |
strong QA team and that we ain't got. However, I agree that the above is too |
25 |
complicated. |
26 |
|
27 |
The other option is to just treat user's virtual settings as a replacement. |
28 |
Cases where there are no brackets or any other notation could be treated as |
29 |
being inside "|| ()" for backward compatibility. |
30 |
|
31 |
Actually, you're example above reminded me of bug #25013. Specifically the |
32 |
comments toward the end relating to the kde.eclass. As these meta-packages |
33 |
are versionable, this scheme would be perfect to handle that (and probably a |
34 |
whole lot of other simple eclasses as well). |
35 |
|
36 |
> On the same kind of idea, i was thinking about an helper tool for |
37 |
> /etc/portage/virtuals (what ufed is to the USE var). If you are |
38 |
> sure that virtuals dep is just a disjonction, then, for a given |
39 |
> virtual, the tool can present to user the list of possible |
40 |
> choices, and user only have to sort his prefered packages. But if |
41 |
> you allow arbitrary formulae, then such a tool becomes harder |
42 |
> to write and to understand for the user. |
43 |
|
44 |
I've almost finished an API for portage that will make this sort of thing |
45 |
relatively easy. If you check it out, the support isn't there yet. By telling |
46 |
me what was needed, you just inspired me on how to support it. :) |
47 |
|
48 |
> > > That say, what is still hard is to know what virtuals a |
49 |
> > > given package instanciates (which is required for instance for |
50 |
> > > correct implementation of the buildsyspkg feature). |
51 |
> |
52 |
> Just to explain this point a bit more, have a look on bug #34964: |
53 |
> The goal was to enable buildpkg for system ebuilds. An issue was |
54 |
> that in profile, there are some system packages specified as |
55 |
> virtuals. The implementation of this "buildsyspkg" feature that is |
56 |
> currently in portage is broken in such cases (if profile ask for |
57 |
> virtual/glibc, the sys-libs/glibc won't be recognized as a system |
58 |
> package). Now that PROVIDES is an aux_get key, that would be easy |
59 |
> to fix. |
60 |
|
61 |
I was aware of the feature and am using it but haven't really looked into the |
62 |
implementation. However, there is another issue if it's as you described. |
63 |
Dependencies of system packages that aren't listed in system would also be |
64 |
exempted. This is a really bad thing, especially if you've built coreutils |
65 |
with USE="acl". |
66 |
|
67 |
I would think that the best way to implement this feature is to look at the |
68 |
dependency graph and build a package for anything that was brought in via an |
69 |
atom in system. |
70 |
|
71 |
> But at the contrary, with your system, this link from a concrete package to |
72 |
> the virtuals it instanciates disappears, so it can no more be fixed. That's |
73 |
> a rather minor issue tho. |
74 |
|
75 |
My current implementation of this feature in the API (the end goal is all |
76 |
logic in emerge being out and reimplemented) scans each atom in system and |
77 |
checks if the package to be merged matches it. Meta-ebuilds shouldn't make |
78 |
that any more difficult. |
79 |
|
80 |
> A maybe more important one if PROVIDES disappears is that you |
81 |
> loose some convenient shortcuts when using eclasses. For instance, |
82 |
> for kernel sources, the eclass has PROVIDES=virtual/kernel |
83 |
|
84 |
True... |
85 |
|
86 |
> (and a few other like this, some of which are conditional, etc.). |
87 |
|
88 |
That behaviour is actually broken. There should be no conditionals whatsoever |
89 |
in the global scope of eclasses or ebuilds. This is a condition of the |
90 |
caching that portage performs and having conditionals in the global scope |
91 |
just means that dependencies are calculated using incorrect data. |
92 |
|
93 |
> With your system, every single kernel sources packages will have to be |
94 |
> listed in the virtual ebuild. |
95 |
|
96 |
In a way it simplifies it as well, though. For example, many of the kernels |
97 |
that inherit kernel-2 and get that automatic PROVIDE have KEYWORDS that |
98 |
severely limit the architecture that it can run on. With a ufed-like virtuals |
99 |
editor you'd have to check the KEYWORDS of each one to ensure that the |
100 |
choices are valid. This way, invalid ones would be gotten rid of in one shot. |
101 |
|
102 |
Thanks for this discussion, by the way. Most of these issues hadn't entered my |
103 |
head whatsoever. If I do make a patch, it'll be well forethought. :) |
104 |
|
105 |
Regards, |
106 |
Jason Stubbs |
107 |
-----BEGIN PGP SIGNATURE----- |
108 |
Version: GnuPG v1.2.4 (GNU/Linux) |
109 |
|
110 |
iQCVAwUBQOAW41oikN4/5jfsAQKtJAP9Htz71ff6aeB8a5YW2rlYSrfESOTy3rg6 |
111 |
R2ElRoGi4k+IxNj2pq6pmHvFxv0lHCNgRIqhuhy/FOCYxmyZMqet/VVFs7UUbVqS |
112 |
nv16HqS+On41rfoCO5mxsoDnkBxMcQp1Dba5YJVZKXNs7AH1Nmbq9kTri/x2oq8j |
113 |
0Rj0gI7ByLU= |
114 |
=Xpkx |
115 |
-----END PGP SIGNATURE----- |
116 |
|
117 |
-- |
118 |
gentoo-dev@g.o mailing list |