diff options
author | André Erdmann <dywi@mailerd.de> | 2013-07-03 11:58:02 +0200 |
---|---|---|
committer | André Erdmann <dywi@mailerd.de> | 2013-07-03 11:58:02 +0200 |
commit | 88cab2b7a719fe8e327220d3809cf47d92d3fce2 (patch) | |
tree | 2f8d4f7c711cf11f386eafa3634c78a984de1619 /doc | |
parent | doc/rst: SLOT handling (diff) | |
download | R_overlay-88cab2b7a719fe8e327220d3809cf47d92d3fce2.tar.gz R_overlay-88cab2b7a719fe8e327220d3809cf47d92d3fce2.tar.bz2 R_overlay-88cab2b7a719fe8e327220d3809cf47d92d3fce2.zip |
doc/html: SLOT handling
Diffstat (limited to 'doc')
-rw-r--r-- | doc/html/usage.html | 74 |
1 files changed, 67 insertions, 7 deletions
diff --git a/doc/html/usage.html b/doc/html/usage.html index c4d90fc..62431a4 100644 --- a/doc/html/usage.html +++ b/doc/html/usage.html @@ -1484,7 +1484,8 @@ as dev-lang/R:</p> <dt>Fuzzy Rules</dt> <dd><p class="first">Fuzzy Rules are <strong>extended Simple Rules</strong>. If the basic lookup as described above fails for a <em>dependency string</em>, -they will <em>try</em> to resolve it as a <strong>version-relative match</strong>.</p> +they will <em>try</em> to resolve it as a <strong>version-relative</strong>, +<strong>slot-relative</strong> or <strong>version,slot-relative match</strong>.</p> <p>To do this, the <em>dependency string</em> will be split into components like <em>dependency name</em>, <em>dependency version</em> and useless comments, which are discarded. @@ -1500,7 +1501,7 @@ it will resolve any of these <em>dependency strings</em>:</p> <li>"R 2.12" as ">=dev-lang/R-2.12"</li> <li>"The R PROGRAMMING LANGUAGE [<2.14] from <a class="reference external" href="http://www.r-project.org/">http://www.r-project.org/</a>" as "<dev-lang/R-2.14"</li> -<li>"R ( !2.10 )" as "( !=dev-lang/R-2.10 dev-lang/R )"</li> +<li>"R ( !=2.10 )" as "( !=dev-lang/R-2.10 dev-lang/R )"</li> </ul> </dd> </dl> @@ -1514,7 +1515,7 @@ See <a class="reference internal" href="#rule-file-syntax">Rule File Syntax</a> <dl class="docutils"> <dt>Example 1 - <em>default</em> fuzzy rule</dt> <dd><p class="first">A rule that matches many dependencies on dev-lang/R, for example -"r 2.12", "R(>= 2.14)", "R [<2.10]", "r{ !2.12 }", and "R", and +"r 2.12", "R(>= 2.14)", "R [<2.10]", "r{ !=2.12 }", and "R", and resolves them as '>=dev-lang/R-2.12', '>=dev-lang/R-2.14', '<dev-lang/R-2.10', etc.:</p> <pre class="code text last literal-block"> @@ -1558,6 +1559,32 @@ in some R package DESCRIPTION files.</p> } </pre> </dd> +<dt>Example 5 - fuzzy slot rule</dt> +<dd><p class="first">A rule that matches many dependencies on sci-libs/fftw and resolves them +as slotted depencency. The <tt class="docutils literal"><span class="pre">s=<range></span></tt> option controls which parts of the +version (from the dependency string) are relevant for calculating the +slot. The following example resolves "fftw 2.1", "fftw 2.1.2" and +"fftw 2.1.3" as "sci-libs/fftw:2.1", "fftw 3.0" as "sci-libs/fftw:3.0" +and so on:</p> +<pre class="code text last literal-block"> +~sci-libs/fftw:s=0..1 :: fftw +</pre> +</dd> +<dt>Example 6 - slot-restricted fuzzy slot rule</dt> +<dd><p class="first">Similar to example 5, but this rule does not resolve anything unless the +calculated slot is allowed.</p> +<pre class="code text last literal-block"> +~sci-libs/fftw:s=0..1:restrict=2.1,3.0: :: fftw +</pre> +</dd> +<dt>Example 7 - slot-restricted fuzzy slot rule with <em>immediate</em> value</dt> +<dd><p class="first">Example 6 is not quite correct, as sci-libs/fftw currently uses slot 3.0 +for various versions from the 3.x range. The following rule resolves +"fftw 3.0", ..., "fftw 3.3" as "sci-libs/fftw:3.0":</p> +<pre class="code text last literal-block"> +~sci-libs/fftw:s=i3.0:restrict=3.0,3.1,3.2,3.3 :: fftw +</pre> +</dd> </dl> <p>Please see the default rule files for more extensive examples that cover other aspects like limiting a rule to certain dependency types. @@ -1624,7 +1651,7 @@ Use braces <em>( ~... )</em> to work around that.</p> <dl class="last docutils"> <dt>Syntax:</dt> <dd><pre class="code text first last literal-block"> -[<keychar>]<dependency> :: <dependency string> +[<keychar>]<dependency>[<rule options>] :: <dependency string> </pre> </dd> </dl> @@ -1636,7 +1663,7 @@ Their rule block begins with '{' + newline, followed by one <dl class="docutils"> <dt>Syntax:</dt> <dd><pre class="code text first last literal-block"> -[<keychar>]<dependency> { +[<keychar>]<dependency>[<rule options>] { <dependency string> [<dependency string>] ... @@ -1651,6 +1678,39 @@ zero or more <em>dependency strings</em>. An empty rule makes little sense, though.</p> </div> </dd> +<dt>Rule Options</dt> +<dd>Certain rule types accept options that control the rule's behavior. +For example, <em>default</em> fuzzy rules can be set up to yield slotted +dependencies.</dd> +<dt>Fuzzy Slot Rules</dt> +<dd><p class="first">Fuzzy Slot rules are a subtype of <em>default</em> fuzzy rules. Appending a colon +character <tt class="docutils literal">:</tt> to the <em>dependency string</em> of a fuzzy rule +(as <em>rule option</em>) turns it into a slot rule.</p> +<p>Fuzzy slot rules accept even more options, each of them separated by one +colong char <tt class="docutils literal">:</tt>:</p> +<ul class="simple"> +<li>slot mode:<ul> +<li><tt class="docutils literal">default</tt>: calculate a slot value (<tt class="docutils literal"><span class="pre"><cat>/<pkg>:<SLOT></span></tt>)</li> +<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> +<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> +</ul> +</li> +<li>accepted <em>calculated</em> slot values can be restricted with +<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> +<li>relevant slot parts can be set with <tt class="docutils literal"><span class="pre">slotparts=<selection></span></tt> or +<tt class="docutils literal"><span class="pre">s=<selection></span></tt></li> +<li>relevant subslot parts can be set with <tt class="docutils literal"><span class="pre">subslotparts=<selection></span></tt> or +<tt class="docutils literal">/<selection></tt></li> +<li>slot operator can be set to <tt class="docutils literal">*</tt> or <tt class="docutils literal">=</tt></li> +</ul> +<p><tt class="docutils literal"><selection></tt> can be an index (integer) range +<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> +<div class="note last"> +<p class="first admonition-title">Note</p> +<p class="last">Fuzzy Slot rules cannot resolve "not <version>" statements, e.g. +"R ( != 2.14 )".</p> +</div> +</dd> <dt>Comments</dt> <dd>start with <strong>#</strong>. There are a few exceptions to that, the <em>#deptype</em> and <em>#! NOPARSE</em> keywords. Comments inside rule blocks are not allowed and @@ -1689,7 +1749,7 @@ as <em>sci-R/zoo</em>. This rule can be written as a single word, <em>zoo</em>.< <dl class="last docutils"> <dt>Syntax:</dt> <dd><pre class="code text first last literal-block"> -[<keychar>]<short dependency> +[<keychar>]<short dependency>[<rule options>] </pre> </dd> </dl> @@ -3933,7 +3993,7 @@ becomes "loop until resolver closes".</p> </div> <div class="footer"> <hr class="footer" /> -Generated on: 2013-06-26. +Generated on: 2013-07-03. </div> </body> |