X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/22c3ac52252b6eafe0d31485b18730cfb53a8dc3..eb1000f6e5fa7035c764d0e7aa9ca71c7aa8d52d:/doc/external-dependency-solver-protocol.txt diff --git a/doc/external-dependency-solver-protocol.txt b/doc/external-dependency-solver-protocol.txt index 7db1479b2..e2bd95866 100644 --- a/doc/external-dependency-solver-protocol.txt +++ b/doc/external-dependency-solver-protocol.txt @@ -9,8 +9,8 @@ External Dependency Solver Protocol". In the following we use the term **architecture qualified package name** (or *arch-qualified package names* for short) to refer to package -identifiers of the form "arch:package" where "arch" is a dpkg -architecture and "package" a dpkg package name. +identifiers of the form "package:arch" where "package" is a package name +and "arch" a dpkg architecture. ## Components @@ -58,17 +58,24 @@ configuration documentation for more, and more up to date, information. - **APT::Solver**: the name of the solver to be used for dependency solving. Defaults to `internal` +- **Dir::Bin::Solvers**: absolute path of the directory where to look for + external solvers. Defaults to `/usr/lib/apt/solvers`. + - **APT::Solver::Strict-Pinning**: whether pinning must be strictly respected (as the internal solver does) or can be slightly deviated from. Defaults to `yes`. -- **APT::Solver::NAME::Preferences** (where NAME is a solver name): - solver-specific user preference string used during dependency solving, - when the solver NAME is in use. Check solver-specific documentation - for what is supported here. Defaults to the empty string. +- **APT::Solver::Preferences**: user preference string used during + dependency solving by the requested solver. Check the documentation + of the solver you are using if and what is supported as a value 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`. +The options **Strict-Pinning** and **Preferences** can also be set for +a specific solver only via **APT::Solver::NAME::Strict-Pinning** and +**APT::Solver::NAME::Preferences** respectively where `NAME` is the name +of the external solver this option should apply to. These options if set +override the generic options; for simplicity the documentation will +refer only to the generic options. ## Protocol @@ -171,8 +178,13 @@ The following **preference fields** are supported in request stanzas: field comes from the `APT::Solver::Strict-Pinning` configuration option. -- **Preferences:** a solver-specific optimization string, usually coming - from the `APT::Solver::Preferences` configuration option. +- **Solver:** (optional, defaults to the empty string) a purely + informational string specifying to which solver this request was send + initially. + +- **Preferences:** (optional, defaults to the empty string) + a solver-specific optimization string, usually coming from the + `APT::Solver::Preferences` configuration option. #### Package universe @@ -210,7 +222,7 @@ field. The following fields are supported in package stanzas: - **APT-Candidate:** (optional, defaults to `no`). Allowed values: `yes`, `no`. When set to `yes`, the corresponding package is the APT candidate for installation among all available packages with the same - name and with the same architecture. + name and architecture. - **APT-Automatic:** (optional, defaults to `no`). Allowed values: `yes`, `no`. When set to `yes`, the corresponding package is marked by @@ -227,6 +239,12 @@ field. The following fields are supported in package stanzas: Release file entry (Origin, Label, Codename, etc.) in the format of APT_PREFERENCES(5). +- **Source:** (optional) The name of the source package the binary + package this record is for was built from. + This field does NOT include the version of the source package unlike + the Source field in the dpkg database. The version is optionally + available in the **Source-Version:** field. + ### Answer @@ -236,11 +254,11 @@ An answer from the external solver to APT is either a *solution* or an The following invariant on **exit codes** must hold true. When the external solver is *able to find a solution*, it will write the solution to standard output and then exit with an exit code of 0. When the -external solver is *unable to find a solution* (and s aware of that), it -will write an error to standard output and then exit with an exit code -of 0. An exit code other than 0 will be interpreted as a solver crash -with no meaningful error about dependency resolution to convey to the -user. +external solver is *unable to find a solution* (and is aware of that), +it will write an error to standard output and then exit with an exit +code of 0. An exit code other than 0 will be interpreted as a solver +crash with no meaningful error about dependency resolution to convey to +the user. #### Solution