1 |
Author: halcy0n |
2 |
Date: 2008-05-29 02:31:48 +0000 (Thu, 29 May 2008) |
3 |
New Revision: 128 |
4 |
|
5 |
Added: |
6 |
trunk/general-concepts/virtuals/ |
7 |
trunk/general-concepts/virtuals/text.xml |
8 |
Modified: |
9 |
trunk/general-concepts/text.xml |
10 |
Log: |
11 |
Add in documentation about virtuals; bug #140180 |
12 |
|
13 |
|
14 |
Modified: trunk/general-concepts/text.xml |
15 |
=================================================================== |
16 |
--- trunk/general-concepts/text.xml 2008-05-23 02:20:21 UTC (rev 127) |
17 |
+++ trunk/general-concepts/text.xml 2008-05-29 02:31:48 UTC (rev 128) |
18 |
@@ -43,4 +43,5 @@ |
19 |
<include href="tree/"/> |
20 |
<include href="use-flags/"/> |
21 |
<include href="user-environment/"/> |
22 |
+<include href="virtuals/"/> |
23 |
</guide> |
24 |
|
25 |
Added: trunk/general-concepts/virtuals/text.xml |
26 |
=================================================================== |
27 |
--- trunk/general-concepts/virtuals/text.xml (rev 0) |
28 |
+++ trunk/general-concepts/virtuals/text.xml 2008-05-29 02:31:48 UTC (rev 128) |
29 |
@@ -0,0 +1,91 @@ |
30 |
+<?xml version="1.0"?> |
31 |
+<guide self="general-concepts/viruals/"> |
32 |
+<chapter> |
33 |
+<title>Virtuals</title> |
34 |
+ |
35 |
+<body> |
36 |
+<p> |
37 |
+Currently there exist two different forms of virtuals, our regular |
38 |
+<c>PROVIDE</c> type virtuals, and so called <e>new-style</e> virtuals. |
39 |
+</p> |
40 |
+</body> |
41 |
+ |
42 |
+<section> |
43 |
+<title><e>Old-style</e> Virtuals</title> |
44 |
+<body> |
45 |
+<p> |
46 |
+<e>Old-style</e> virtuals are not really packages, but are something you can depend |
47 |
+upon and install. All <e>old-style</e> virtuals must have a category of |
48 |
+"virtual". In order to use an <e>old-style</e> virtual there are a few things |
49 |
+that need to be present in the tree: |
50 |
+ |
51 |
+<ul> |
52 |
+ <li> |
53 |
+ Atleast one ebuild must <c>PROVIDE</c> the virtual <d/> see |
54 |
+ <uri link="::ebuild-writing/variables#Optional Variables" /> |
55 |
+ </li> |
56 |
+ <li> |
57 |
+ An entry in the virtuals file for each profile to list the default provider |
58 |
+ </li> |
59 |
+</ul> |
60 |
+ |
61 |
+<e>Old-style</e> virtuals are not as flexible as <e>new-style</e> virtuals |
62 |
+because there is no concept of a version. You can only depend upon a virtual, |
63 |
+but not a particular version of that virtual. |
64 |
+</p> |
65 |
+<p> |
66 |
+There are some things that are still only possible with old-style virtuals, |
67 |
+which is why they are still useful: |
68 |
+ |
69 |
+<ul> |
70 |
+ <li> |
71 |
+ Packages providing the virtual can block the virtual, so you can ensure |
72 |
+ nothing else is installed that also provides that virtual. |
73 |
+ </li> |
74 |
+ <li> |
75 |
+ The ability to set a default in the profile for what the virtual should |
76 |
+ pull in (without the need of pulling the package into the system set). |
77 |
+ </li> |
78 |
+</ul> |
79 |
+</p> |
80 |
+</body> |
81 |
+</section> |
82 |
+ |
83 |
+<section> |
84 |
+<title><e>New-style</e> Virtuals</title> |
85 |
+<body> |
86 |
+<p> |
87 |
+<e>New-style</e> virtuals are merely packages that are in the category of |
88 |
+<c>virtual</c>. They use their dependency string to specify the providers for |
89 |
+the virtual and should not install any files. Since they are regular ebuilds, |
90 |
+there can be several versions of a virtual (which can be helpful when a package |
91 |
+may be provided by another in some versions, and not others <d/> see the perl |
92 |
+virtuals for an example of this). One other difference (besides not installing |
93 |
+any files) is that a <e>new-style</e> virtual has an empty string for the value |
94 |
+of the <c>LICENSE</c> and <c>HOMEPAGE</c> variables. Since it installs no files, |
95 |
+it really does not have a license. |
96 |
+</p> |
97 |
+ |
98 |
+<p> |
99 |
+An example of a <e>new-style</e> virtual: |
100 |
+ |
101 |
+<codesample lang="ebuild"> |
102 |
+DESCRIPTION="Virtual for C++ tr1 <type_traits>" |
103 |
+HOMEPAGE="http://www.gentoo.org/proj/en/base/" |
104 |
+SRC_URI="" |
105 |
+LICENSE="" |
106 |
+SLOT="0" |
107 |
+KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86 ~x86-fbsd" |
108 |
+IUSE="" |
109 |
+RDEPEND="|| ( >=sys-devel/gcc-4.1 dev-libs/boost )" |
110 |
+DEPEND="" |
111 |
+</codesample> |
112 |
+ |
113 |
+Looks familar...right? It should since its going to look just like a regular |
114 |
+ebuild. |
115 |
+</p> |
116 |
+</body> |
117 |
+</section> |
118 |
+ |
119 |
+</chapter> |
120 |
+</guide> |
121 |
|
122 |
-- |
123 |
gentoo-commits@l.g.o mailing list |