1 |
commit: 88cab2b7a719fe8e327220d3809cf47d92d3fce2 |
2 |
Author: André Erdmann <dywi <AT> mailerd <DOT> de> |
3 |
AuthorDate: Wed Jul 3 09:58:02 2013 +0000 |
4 |
Commit: André Erdmann <dywi <AT> mailerd <DOT> de> |
5 |
CommitDate: Wed Jul 3 09:58:02 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=88cab2b7 |
7 |
|
8 |
doc/html: SLOT handling |
9 |
|
10 |
--- |
11 |
doc/html/usage.html | 74 ++++++++++++++++++++++++++++++++++++++++++++++++----- |
12 |
1 file changed, 67 insertions(+), 7 deletions(-) |
13 |
|
14 |
diff --git a/doc/html/usage.html b/doc/html/usage.html |
15 |
index c4d90fc..62431a4 100644 |
16 |
--- a/doc/html/usage.html |
17 |
+++ b/doc/html/usage.html |
18 |
@@ -1484,7 +1484,8 @@ as dev-lang/R:</p> |
19 |
<dt>Fuzzy Rules</dt> |
20 |
<dd><p class="first">Fuzzy Rules are <strong>extended Simple Rules</strong>. If the basic lookup |
21 |
as described above fails for a <em>dependency string</em>, |
22 |
-they will <em>try</em> to resolve it as a <strong>version-relative match</strong>.</p> |
23 |
+they will <em>try</em> to resolve it as a <strong>version-relative</strong>, |
24 |
+<strong>slot-relative</strong> or <strong>version,slot-relative match</strong>.</p> |
25 |
<p>To do this, the <em>dependency string</em> will be split into components like |
26 |
<em>dependency name</em>, <em>dependency version</em> and useless comments, which are |
27 |
discarded. |
28 |
@@ -1500,7 +1501,7 @@ it will resolve any of these <em>dependency strings</em>:</p> |
29 |
<li>"R 2.12" as ">=dev-lang/R-2.12"</li> |
30 |
<li>"The R PROGRAMMING LANGUAGE [<2.14] from <a class="reference external" href="http://www.r-project.org/">http://www.r-project.org/</a>" |
31 |
as "<dev-lang/R-2.14"</li> |
32 |
-<li>"R ( !2.10 )" as "( !=dev-lang/R-2.10 dev-lang/R )"</li> |
33 |
+<li>"R ( !=2.10 )" as "( !=dev-lang/R-2.10 dev-lang/R )"</li> |
34 |
</ul> |
35 |
</dd> |
36 |
</dl> |
37 |
@@ -1514,7 +1515,7 @@ See <a class="reference internal" href="#rule-file-syntax">Rule File Syntax</a> |
38 |
<dl class="docutils"> |
39 |
<dt>Example 1 - <em>default</em> fuzzy rule</dt> |
40 |
<dd><p class="first">A rule that matches many dependencies on dev-lang/R, for example |
41 |
-"r 2.12", "R(>= 2.14)", "R [<2.10]", "r{ !2.12 }", and "R", and |
42 |
+"r 2.12", "R(>= 2.14)", "R [<2.10]", "r{ !=2.12 }", and "R", and |
43 |
resolves them as '>=dev-lang/R-2.12', '>=dev-lang/R-2.14', |
44 |
'<dev-lang/R-2.10', etc.:</p> |
45 |
<pre class="code text last literal-block"> |
46 |
@@ -1558,6 +1559,32 @@ in some R package DESCRIPTION files.</p> |
47 |
} |
48 |
</pre> |
49 |
</dd> |
50 |
+<dt>Example 5 - fuzzy slot rule</dt> |
51 |
+<dd><p class="first">A rule that matches many dependencies on sci-libs/fftw and resolves them |
52 |
+as slotted depencency. The <tt class="docutils literal"><span class="pre">s=<range></span></tt> option controls which parts of the |
53 |
+version (from the dependency string) are relevant for calculating the |
54 |
+slot. The following example resolves "fftw 2.1", "fftw 2.1.2" and |
55 |
+"fftw 2.1.3" as "sci-libs/fftw:2.1", "fftw 3.0" as "sci-libs/fftw:3.0" |
56 |
+and so on:</p> |
57 |
+<pre class="code text last literal-block"> |
58 |
+~sci-libs/fftw:s=0..1 :: fftw |
59 |
+</pre> |
60 |
+</dd> |
61 |
+<dt>Example 6 - slot-restricted fuzzy slot rule</dt> |
62 |
+<dd><p class="first">Similar to example 5, but this rule does not resolve anything unless the |
63 |
+calculated slot is allowed.</p> |
64 |
+<pre class="code text last literal-block"> |
65 |
+~sci-libs/fftw:s=0..1:restrict=2.1,3.0: :: fftw |
66 |
+</pre> |
67 |
+</dd> |
68 |
+<dt>Example 7 - slot-restricted fuzzy slot rule with <em>immediate</em> value</dt> |
69 |
+<dd><p class="first">Example 6 is not quite correct, as sci-libs/fftw currently uses slot 3.0 |
70 |
+for various versions from the 3.x range. The following rule resolves |
71 |
+"fftw 3.0", ..., "fftw 3.3" as "sci-libs/fftw:3.0":</p> |
72 |
+<pre class="code text last literal-block"> |
73 |
+~sci-libs/fftw:s=i3.0:restrict=3.0,3.1,3.2,3.3 :: fftw |
74 |
+</pre> |
75 |
+</dd> |
76 |
</dl> |
77 |
<p>Please see the default rule files for more extensive examples that cover |
78 |
other aspects like limiting a rule to certain dependency types. |
79 |
@@ -1624,7 +1651,7 @@ Use braces <em>( ~... )</em> to work around that.</p> |
80 |
<dl class="last docutils"> |
81 |
<dt>Syntax:</dt> |
82 |
<dd><pre class="code text first last literal-block"> |
83 |
-[<keychar>]<dependency> :: <dependency string> |
84 |
+[<keychar>]<dependency>[<rule options>] :: <dependency string> |
85 |
</pre> |
86 |
</dd> |
87 |
</dl> |
88 |
@@ -1636,7 +1663,7 @@ Their rule block begins with '{' + newline, followed by one |
89 |
<dl class="docutils"> |
90 |
<dt>Syntax:</dt> |
91 |
<dd><pre class="code text first last literal-block"> |
92 |
-[<keychar>]<dependency> { |
93 |
+[<keychar>]<dependency>[<rule options>] { |
94 |
<dependency string> |
95 |
[<dependency string>] |
96 |
... |
97 |
@@ -1651,6 +1678,39 @@ zero or more <em>dependency strings</em>. An empty rule makes little sense, |
98 |
though.</p> |
99 |
</div> |
100 |
</dd> |
101 |
+<dt>Rule Options</dt> |
102 |
+<dd>Certain rule types accept options that control the rule's behavior. |
103 |
+For example, <em>default</em> fuzzy rules can be set up to yield slotted |
104 |
+dependencies.</dd> |
105 |
+<dt>Fuzzy Slot Rules</dt> |
106 |
+<dd><p class="first">Fuzzy Slot rules are a subtype of <em>default</em> fuzzy rules. Appending a colon |
107 |
+character <tt class="docutils literal">:</tt> to the <em>dependency string</em> of a fuzzy rule |
108 |
+(as <em>rule option</em>) turns it into a slot rule.</p> |
109 |
+<p>Fuzzy slot rules accept even more options, each of them separated by one |
110 |
+colong char <tt class="docutils literal">:</tt>:</p> |
111 |
+<ul class="simple"> |
112 |
+<li>slot mode:<ul> |
113 |
+<li><tt class="docutils literal">default</tt>: calculate a slot value (<tt class="docutils literal"><span class="pre"><cat>/<pkg>:<SLOT></span></tt>)</li> |
114 |
+<li><tt class="docutils literal">with_version</tt> or <tt class="docutils literal">+v</tt>: include version, too (<tt class="docutils literal"><span class="pre">=<cat>/<pkg>-<pkgver>:<SLOT></span></tt>)</li> |
115 |
+<li><tt class="docutils literal">open</tt>: non-versioned slot (<tt class="docutils literal"><span class="pre"><cat>/<pkg>:*</span></tt> or <tt class="docutils literal"><span class="pre"><cat>/<pkg>:=</span></tt>)</li> |
116 |
+</ul> |
117 |
+</li> |
118 |
+<li>accepted <em>calculated</em> slot values can be restricted with |
119 |
+<tt class="docutils literal"><span class="pre">restrict=<list</span> of accepted values</tt> or <tt class="docutils literal"><span class="pre">r=<list></span></tt></li> |
120 |
+<li>relevant slot parts can be set with <tt class="docutils literal"><span class="pre">slotparts=<selection></span></tt> or |
121 |
+<tt class="docutils literal"><span class="pre">s=<selection></span></tt></li> |
122 |
+<li>relevant subslot parts can be set with <tt class="docutils literal"><span class="pre">subslotparts=<selection></span></tt> or |
123 |
+<tt class="docutils literal">/<selection></tt></li> |
124 |
+<li>slot operator can be set to <tt class="docutils literal">*</tt> or <tt class="docutils literal">=</tt></li> |
125 |
+</ul> |
126 |
+<p><tt class="docutils literal"><selection></tt> can be an index (integer) range |
127 |
+<tt class="docutils literal"><span class="pre">[<low>:=0]..[<high>:=<low>]</span></tt> or a fixed value <tt class="docutils literal">i<value></tt>.</p> |
128 |
+<div class="note last"> |
129 |
+<p class="first admonition-title">Note</p> |
130 |
+<p class="last">Fuzzy Slot rules cannot resolve "not <version>" statements, e.g. |
131 |
+"R ( != 2.14 )".</p> |
132 |
+</div> |
133 |
+</dd> |
134 |
<dt>Comments</dt> |
135 |
<dd>start with <strong>#</strong>. There are a few exceptions to that, the <em>#deptype</em> and |
136 |
<em>#! NOPARSE</em> keywords. Comments inside rule blocks are not allowed and |
137 |
@@ -1689,7 +1749,7 @@ as <em>sci-R/zoo</em>. This rule can be written as a single word, <em>zoo</em>.< |
138 |
<dl class="last docutils"> |
139 |
<dt>Syntax:</dt> |
140 |
<dd><pre class="code text first last literal-block"> |
141 |
-[<keychar>]<short dependency> |
142 |
+[<keychar>]<short dependency>[<rule options>] |
143 |
</pre> |
144 |
</dd> |
145 |
</dl> |
146 |
@@ -3933,7 +3993,7 @@ becomes "loop until resolver closes".</p> |
147 |
</div> |
148 |
<div class="footer"> |
149 |
<hr class="footer" /> |
150 |
-Generated on: 2013-06-26. |
151 |
+Generated on: 2013-07-03. |
152 |
|
153 |
</div> |
154 |
</body> |