From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: doc/html/
Date: Wed, 3 Jul 2013 10:05:32 +0000 (UTC) [thread overview]
Message-ID: <1372845482.88cab2b7a719fe8e327220d3809cf47d92d3fce2.dywi@gentoo> (raw)
Message-ID: <20130703100532.9enY2_K_axpq9ed9t4fcky-j86QU5Ga26szdXlYitwU@z> (raw)
commit: 88cab2b7a719fe8e327220d3809cf47d92d3fce2
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Jul 3 09:58:02 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Jul 3 09:58:02 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=88cab2b7
doc/html: SLOT handling
---
doc/html/usage.html | 74 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file 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>
next reply other threads:[~2013-07-03 10:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 10:04 André Erdmann [this message]
2013-07-03 10:05 ` [gentoo-commits] proj/R_overlay:master commit in: doc/html/ André Erdmann
-- strict thread matches above, loose matches on Subject: below --
2013-07-23 14:57 André Erdmann
2013-07-23 14:57 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-16 16:35 André Erdmann
2013-07-10 16:16 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-10 15:10 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-26 17:29 André Erdmann
2013-06-18 14:12 André Erdmann
2013-06-12 21:10 André Erdmann
2013-06-05 18:08 André Erdmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1372845482.88cab2b7a719fe8e327220d3809cf47d92d3fce2.dywi@gentoo \
--to=dywi@mailerd.de \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox