From: Stefano Zacchiroli Date: Wed, 4 Sep 2013 15:13:49 +0000 (+0200) Subject: EDSP: add Architecture(s) multi-arch fields to the Request stanza X-Git-Tag: 1.0.4~23^2~2 X-Git-Url: http://git.hcoop.net/ntk/apt.git/commitdiff_plain/caa3279367401965cbdd5e3a41c47945f3e263bd EDSP: add Architecture(s) multi-arch fields to the Request stanza --- diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index a44d4a4a..33478dfa 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -232,6 +232,15 @@ bool EDSP::WriteRequest(pkgDepCache &Cache, FILE* output, bool const Upgrade, req->append(" ").append(Pkg.FullName()); } fprintf(output, "Request: EDSP 0.5\n"); + + const char *arch = _config->Find("APT::Architecture").c_str(); + std::vector archs = APT::Configuration::getArchitectures(); + fprintf(output, "Architecture: %s\n", arch); + fprintf(output, "Architectures:"); + for (std::vector::const_iterator a = archs.begin(); a != archs.end(); ++a) + fprintf(output, " %s", a->c_str()); + fprintf(output, "\n"); + if (del.empty() == false) fprintf(output, "Remove: %s\n", del.c_str()+1); if (inst.empty() == false) diff --git a/doc/external-dependency-solver-protocol.txt b/doc/external-dependency-solver-protocol.txt index 7d41571d..477bc23e 100644 --- a/doc/external-dependency-solver-protocol.txt +++ b/doc/external-dependency-solver-protocol.txt @@ -110,7 +110,8 @@ Within a dependency solving scenario, a request represents the action on 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 @@ -118,6 +119,16 @@ 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: + +- **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: - **Install:** (optional, defaults to the empty string) A space