1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Hi all, |
5 |
|
6 |
I had another crazy idea that I'd like some feedback on. I'll jump straight |
7 |
in. With the current virtuals system, there are two basic deficiencies: |
8 |
|
9 |
1. Packages that can provide a virtual based on USE flags can't. (#32114) |
10 |
2. Different versions of a virtual are not supported. (#46968) |
11 |
|
12 |
The proposal for 1 is to have PROVIDE use a syntax similar to DEPEND for |
13 |
specifying any USE flag relationship. There is currently no proposal for 2. |
14 |
|
15 |
What I'm proposing here is to drop virtuals altogether. Instead, I propose |
16 |
using meta-packages similar to kde and gnome. To give a give a cut down |
17 |
example: |
18 |
|
19 |
virtual/x11-1.ebuild: |
20 |
RDEPEND="x86? ( || ( x11-base/xfree x11-base/xorg-x11 ) ) |
21 |
sparc? ( || ( x11-base/xorg-x11 x11-base/xfree ) )" |
22 |
|
23 |
The -1 in x11-1 is an arbitrary version. This example shows the only |
24 |
deficiency of doing it this way that I am able to think of. Instead of |
25 |
specifying the default virtuals per profile, they would only be able to be |
26 |
specified per architecture. |
27 |
|
28 |
Now to an example that shows a resolution to issue 2 above: |
29 |
|
30 |
virtual/jdk-1.4.ebuild: |
31 |
RDEPEND="|| ( >=dev-java/blackdown-jdk-1.4 >=dev-java/kaffe-1.1.4 ... )" |
32 |
|
33 |
The different versions aspect is represented here by kaffe-1.1.4. Even it is |
34 |
installed it is presently not able to satisfy >=virtual/jdk-1.4 as its |
35 |
version component does not match. |
36 |
|
37 |
As for issue number 1, it will require a (already scheduled) portage |
38 |
enhancement: |
39 |
|
40 |
virtual/login-1.ebuild: |
41 |
RDEPEND="|| sys-apps/shadow[pam] sys-apps/pam-login[-pam]" |
42 |
|
43 |
Here, shadow with USE="pam" or pam-login with USE="-pam" are supported. |
44 |
|
45 |
As a side note, a single atom is chosen || () dependencies. If something |
46 |
installed satisfied any of the atoms, then the installed package is used. |
47 |
Otherwise the first package in the list is used. |
48 |
|
49 |
Finally, there are two additional benefits. One is a slight speed increase as |
50 |
portage would no longer have to concern itself with virtuals. Second, is that |
51 |
it would be possible to find all packages that satisify a virtual without |
52 |
scanning the entire tree for PROVIDEs. |
53 |
|
54 |
Do I burn in hell? (Again? ;) |
55 |
|
56 |
Regards, |
57 |
Jason Stubbs |
58 |
-----BEGIN PGP SIGNATURE----- |
59 |
Version: GnuPG v1.2.4 (GNU/Linux) |
60 |
|
61 |
iQCVAwUBQNQo2FoikN4/5jfsAQL9sQP/UBzFzWlQJ/VkUx+aWGMX505okHhT3XWf |
62 |
2AxL1y6uTaFdOD4i5kVtzfB+tQ9IOLsVHygIHZS9rFSTC95bvUAX7/yO91BgzIkL |
63 |
zdI9gKquLgLRexCpBZ5qMLi5Bfruv3bWuCbnU3gTFIjhUSHT2Xs6oHm7jViwTk1W |
64 |
X9uje3B4xPQ= |
65 |
=y7Uj |
66 |
-----END PGP SIGNATURE----- |
67 |
|
68 |
-- |
69 |
gentoo-dev@g.o mailing list |