Package and Set Dependency Specifications
Dependency specifications can look like:
set
: A simple set name. Only supported where a named set makes sense.pkg
: A simple package name. Not supported in configuration files, and only supported where Paludis can safely disambiguate this intocat/pkg
.cat/pkg
: A simple package name with explicit category. This may be followed by suffixes, as described below.=cat/pkg-1.23
: A simple package name with an explicit category, package and version. Operators other than=
are available, described below. This may be followed by suffixes.
In some places, either or both of cat
and pkg
may be *
, which matches any
category or package. This is not permitted where it would not make sense. To match any package in any category, use
*/*
.
Suffixes
The cat/pkg
and =cat/pkg-1.23
forms may be followed by zero or more optional suffixes, in
the following order:
:slot
: Match only in that slot.::repo->repo
: Repository requirements, described below.::something
: like::->something
, for all legal values of something.[use]
and[-use]
: Match only if the named USE flag is enabled / disabled for this package. May be specified multiple times with different USE flag names.[=1.23]
: Match a particular version. Any operator described below can be used. May be extended to ranged dependencies, using either[=1.23|=1.24|=1.25]
for an or dependency or[>=1.2&<2]
for an and dependency.[.key?]
: Match only if the specified metadata key exists.key
may be a key's raw name (e.g.DESCRIPTION
,DEPEND
) or a role prefixed with a dollar sign (e.g.$short_description
,$build_dependencies
). If the key's name is prefixed with::
, metadata from the repository rather than the package ID is checked. If the key is in(parens)
, matches masks by role, token or associated key (and(*)
matches any mask).[.key=value]
: Match only if the specified metadata key has a particular exact value. Only works for simple values, sets and sequences, not spec trees and other complex compound keys. If<
is used in place of=
, 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>
is used, for numeric values a greater-than comparison is used; it does not match for other types of values. If!=
is used for simple values, a not-equal comparison is used. As above, the key may be a raw name or a dollar-prefixed role name, and may be prefixed with::
for checking repository metadata.[.!exclude=spec]
: Exclude packages matchingspec
. The main restriction onspec
is that it may not include the[]
brackets. Following are some of the examples of valid exclude requirements:[.!exclude=cat/pkg]
or[.!exclude=virtual/*]
or[.!exclude=*/*::repo]
or[.!exclude=>=cat/pkg-5::repo]
or[.!exclude=>=cat/pkg-1][.!exclude=<cat/pkg-2]
.
Repository requirements are in the form to
, from->
or ::from->to
. The
from
may only be a repository name, and matches packages originally from that repository (so
*/*::myrepo->
finds installed packages that originated in myrepo
. Valid forms for
to
are as follows:
repo
: currently in this repository. Note that an installed package is no longer 'in' the repository whence it came; use a from specification for that.repo?
: could be installed torepo
.repo??
: could be installed torepo
, ignoring masks./path
: installed at root/path
(typically/
)./path?
: could be installed to some installed repository with root path/path
./path??
: could be installed to some installed repository with root path/path
, ignoring masks.
Operators
The following operators are recognised:
=
- Exactly equal to.
<=
- Less than or equal to.
<
- Strictly less than.
>=
- Greater than or equal to.
>
- Strictly greater than.
~
- 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.
=*
- Starting with this version, componentwise. The asterisk comes after the version part (
=cat/pkg-1.2*
orcat/pkg[=1.2*]
). ~>
- 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,
~>1.2.3
means>=1.2.3
and<1.3
.