summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/edsp.cc9
-rw-r--r--doc/external-dependency-solver-protocol.txt13
2 files changed, 21 insertions, 1 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index a44d4a4a9..33478dfa6 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<string> archs = APT::Configuration::getArchitectures();
+ fprintf(output, "Architecture: %s\n", arch);
+ fprintf(output, "Architectures:");
+ for (std::vector<string>::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 7d41571de..477bc23ed 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