-# APT External Dependency Solver Protocol (EDSP) - version 0.3
+# APT External Dependency Solver Protocol (EDSP) - version 0.5
This document describes the communication protocol between APT and
external dependency solvers. The protocol is called APT EDSP, for "APT
## Installation
-Each external solver is installed as a file under
-`/usr/lib/apt/solvers`. The naming scheme is
-`/usr/lib/apt/solvers/NAME`, where `NAME` is the name of the external
-solver.
+Each external solver is installed as a file under Dir::Bin::Solvers (see
+below), which defaults to `/usr/lib/apt/solvers`. We will assume in the
+remainder of this section that such a default value is in effect.
+
+The naming scheme is `/usr/lib/apt/solvers/NAME`, where `NAME` is the
+name of the external solver.
Each file under `/usr/lib/apt/solvers` corresponding to an external
solver must be executable.
overview of them is given below. Please refer to proper APT
configuration documentation for more, and more up to date, information.
-- **APT::Solver::Name**: the name of the solver to be used for
+- **APT::Solver**: the name of the solver to be used for
dependency solving. Defaults to `internal`
- **APT::Solver::Strict-Pinning**: whether pinning must be strictly
when the solver NAME is in use. Check solver-specific documentation
for what is supported here. Defaults to the empty string.
+- **Dir::Bin::Solvers**: absolute path of the directory where to look for
+ external solvers. Defaults to `/usr/lib/apt/solvers`.
## Protocol
installed packages requested by the user.
A request is a single Deb 822 stanza opened by a mandatory Request field
-and followed by a mixture of action and preference fields.
+and followed by a mixture of action, preference, and global
+configuration fields.
The value of the **Request:** field is a string describing the EDSP
protocol which will be used to communicate. At present, the string must
-be `EDSP 0.3`.
+be `EDSP 0.5`. Request fields are mainly used to identify the beginning
+of a request stanza; their actual values are otherwise not used by the
+EDSP protocol.
+
+The following **configuration fields** are supported in request stanzas:
-a unique request identifier, such as an
-UUID. Request fields are mainly used to identify the beginning of a
-request stanza; their actual values are otherwise not used by the EDSP
-protocol.
+- **Architecture:** (mandatory) The name of the *native* architecture on
+ the user machine (see also: `dpkg --print-architecture`)
+
+- **Architectures:** (optional, defaults to the native architecture) A
+ space separated list of *all* architectures known to APT (this is
+ roughly equivalent to the union of `dpkg --print-architecture` and
+ `dpkg --print-foreign-architectures`)
The following **action fields** are supported in request stanzas:
should be removed by the solver only when the Autoremove action is
requested (see Request section).
+- **APT-Release:** (optional) The releases the package belongs to, according to
+ APT. The format of this field is multiline with one value per line and the
+ first line (the one containing the field name) empty. Each subsequent line
+ corresponds to one of the releases the package belongs to and looks like
+ this: `o=Debian,a=unstable,n=sid,l=Debian,c=main`. That is, each release line
+ is a comma-separated list of "key=value" pairs, each of which denotes a
+ Release file entry (Origin, Label, Codename, etc.) in the format of
+ APT_PREFERENCES(5).
+
### Answer
An answer from the external solver to APT is either a *solution* or an