aboutsummaryrefslogtreecommitdiff
path: root/doc/configuration/specs.html.part
blob: 446b1956af2b88c9f27bd861ad813caf7915d841 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!-- vim: set tw=120 ft=html sw=4 sts=4 et : -->

<h1>Package and Set Dependency Specifications</h1>

<p>Dependency specifications can look like:</p>

<ul>
    <li><code>set</code>: A simple set name. Only supported where a named set makes sense.</li>
    <li><code>pkg</code>: A simple package name. Not supported in configuration files, and only supported where Paludis
    can safely disambiguate this into <code>cat/pkg</code>.</li>
    <li><code>cat/pkg</code>: A simple package name with explicit category. This may be followed by suffixes, as
    described below.</li>
    <li><code>=cat/pkg-1.23</code>: A simple package name with an explicit category, package and version. Operators
    other than <code>=</code> are available, described below. This may be followed by suffixes.</li>
</ul>

<p>In some places, either or both of <code>cat</code> and <code>pkg</code> may be <code>*</code>, which matches any
category or package. This is not permitted where it would not make sense. To match any package in any category, use
<code>*/*</code>.</p>

<h2>Suffixes</h2>

<p>The <code>cat/pkg</code> and <code>=cat/pkg-1.23</code> forms may be followed by zero or more optional suffixes, in
the following order:</p>

<ul>
    <li><code>:slot</code>: Match only in that slot.</li>
    <li><code>::repo-&gt;repo</code>: Repository requirements, described below.</li>
    <li><code>::something</code>: like <code>::-&gt;something</code>, for all legal values of something.</li>
    <li><code>[use]</code> and <code>[-use]</code>: Match only if the named USE flag is enabled / disabled for this
    package. May be specified multiple times with different USE flag names.</li>
    <li><code>[=1.23]</code>: Match a particular version. Any operator described below
    can be used. May be extended to ranged dependencies, using either <code>[=1.23|=1.24|=1.25]</code> for an or
    dependency or <code>[&gt;=1.2&amp;&lt;2]</code> for an and dependency.</li>
    <li><code>[.key=value]</code>: Match only if the specified metadata key has a particular exact value. Only works for
    simple values, sets, sequences and spec trees, not other complex compound keys. If <code>&lt;</code> is used in
    place of <code>=</code>, for numeric values a less-than comparison is used, and for sets, sequences and spec trees,
    a match occurs if any member of the set or sequence is equal to the value. Similarly if <code>&gt;</code> is used,
    for numeric values a greater-than comparison is used; it does not match for other types of values.</li>
</ul>

<p>Repository requirements are in the form <code>to</code>, <code>from-&gt;</code> or <code>::from-&gt;to</code>. The
<code>from</code> may only be a repository name, and matches packages <em>originally</em> from that repository (so
<code>*/*::myrepo-&gt;</code> finds installed packages that originated in <code>myrepo</code>. Valid forms for
<code>to</code> are as follows:</p>

<ul>
    <li><code>repo</code>: currently in this repository. Note that an installed package is no longer 'in' the repository
    whence it came; use a from specification for that.</li>
    <li><code>repo?</code>: could be installed to <code>repo</code>.</li>
    <li><code>repo??</code>: could be installed to <code>repo</code>, ignoring masks.</li>
    <li><code>/path</code>: installed at root <code>/path</code> (typically <code>/</code>).</li>
    <li><code>/path?</code>: could be installed to some installed repository with root path <code>/path</code>.</li>
    <li><code>/path??</code>: could be installed to some installed repository with root path <code>/path</code>,
    ignoring masks.</li>
</ul>

<h2>Operators</h2>

<p>The following operators are recognised:</p>

<dl>
    <dt><code>=</code></dt>
    <dd>Exactly equal to.</dd>

    <dt><code>&lt;=</code></dt>
    <dd>Less than or equal to.</dd>

    <dt><code>&lt;</code></dt>
    <dd>Strictly less than.</dd>

    <dt><code>&gt;=</code></dt>
    <dd>Greater than or equal to.</dd>

    <dt><code>&gt;</code></dt>
    <dd>Strictly greater than.</dd>

    <dt><code>~</code></dt>
    <dd>Equal to, ignoring the package revision. If a package revision is specified, in addition the package must be of
    greater than or equal to this revision.</dd>

    <dt><code>=*</code></dt>
    <dd>Starting with this version, componentwise. The asterisk comes <em>after</em> the version part (<code>=cat/pkg-1.2*</code> or
    <code>cat/pkg[=1.2*]</code>).</dd>

    <dt><code>~&gt;</code></dt>
    <dd>Greater than or equal to the version, and strictly less than the version with its one-before-least-significant
    digit part incremented, and its least significant digit part discarded. For example, <code>~&gt;1.2.3</code> means
    <code>&gt;=1.2.3</code> and <code>&lt;1.3</code>.</dd>
</dl>