the ``evr'' sub-dependency is fulfilled. See the section about boolean
dependencies about more information.
+*REL_UNLESS*::
+A conditional dependency, the ``name'' sub-dependency is only considered if
+the ``evr'' sub-dependency is not fulfilled. See the section about boolean
+dependencies about more information.
+
*REL_COMPAT*::
A compat dependency used in Haiku to represent version ranges. The
``name'' part is the actual version, the ``evr'' part is the backwards
compatibility version.
+*REL_KIND*::
+A pseudo dependency that limits the solvables to a specific kind.
+The kind is expected to be a prefix of the solvable name, e.g.
+``patch:foo'' would be of kind ``patch''. ``REL_KIND'' is only
+supported in the selection functions.
+
+*REL_MULTIARCH*::
+A debian multiarch annotation. The most common value for the ``evr''
+part is ``any''.
+
+*REL_ELSE*::
+The else part of a ``REL_COND'' or ``REL_UNLESS'' dependency. See the
+section about boolean dependencies.
+
+*REL_ERROR*::
+An illegal dependency. This is useful to encode dependency parse errors.
+
=== Functions ===
Id pool_str2id(Pool *pool, const char *str, int create);
Boolean Dependencies
--------------------
Boolean Dependencies allow to build complex expressions from simple
-dependencies. While rpm does not support boolean expressions in
-dependencies and debian only allows an "OR" expression, libsolv
-allows arbitrary complex expressions. The following basic types
-are supported:
+dependencies. Note that depending on the package manager only a subset
+of those may be useful. For example, debian currently only allows
+an "OR" expression.
*REL_OR*::
The expression is true if either the first dependency or the second
*REL_AND*::
The expression is true if both dependencies are true. The packages
fulfilling the dependencies may be different, i.e.
-``Supplements: perl AND python'' is true if both a package providing
-perl and a package providing python are installed. The solver currently
-only supports REL_AND in Supplements/Enhances dependencies, in other
-types of dependencies it gets treated as REL_WITH.
+``Supplements: perl REL_AND python'' is true if both a package providing
+perl and a package providing python are installed.
*REL_WITH*::
The expression is true if both dependencies are true and are fulfilled by
-the same package. Thus ``Supplements: perl AND python'' would only be true
+the same package. Thus ``Supplements: perl REL_WITH python'' would only be true
if a package is installed that provides both dependencies (some kind
of multi-language interpreter).
*REL_COND*::
The expression is true if the first dependency is true or the second
-dependency is false. Libsolv currently does not support this type of
-dependency in the solver code.
+dependency is false. ``A REL_COND B'' is equivalent to
+``A REL_OR (NOT B)'' (except that libsolv does not expose ``NOT'').
+
+*REL_UNLESS*::
+The expression is true if the first dependency is true and the second
+dependency is false. ``A REL_UNLESS B'' is equivalent to
+``A REL_AND (NOT B)'' (except that libsolv does not expose ``NOT'').
+
+*REL_ELSE*::
+The ``else'' part of a ``REL_COND'' or ``REL_UNLESS'' dependency.
+It has to be directly in the evr part of the condition,
+e.g. ``foo REL_COND (bar REL_ELSE baz)''.
+For ``REL_COND'' this is equivalent to writing
+``(foo REL_COND bar) REL_AND (bar REL_OR baz)''.
+For ``REL_UNLESS'' this is equivalent to writing
+``(foo REL_UNLESS bar) REL_OR (bar REL_AND baz)''.
Each sub-dependency of a boolean dependency can in turn be a boolean
dependency, so you can chain them to create complex dependencies.
------
Michael Schroeder <mls@suse.de>
+////
+vim: syntax=asciidoc
+////