From 44cb56e6fd279b994cad3f5a31e50240d723628a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 11 Aug 2011 16:33:42 +0200 Subject: * methods/mirror.cc: - include the architecture(s) in the query string as well so that the server can make better decisions --- debian/changelog | 5 ++++- methods/mirror.cc | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b2efeae1b..519395af8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,11 @@ apt (0.8.16~exp5ubuntu5) UNRELEASED; urgency=low * debian/control: - fix VCS location + * methods/mirror.cc: + - include the architecture(s) in the query string as well so + that the server can make better decisions - -- Michael Vogt Wed, 10 Aug 2011 06:48:11 +0200 + -- Michael Vogt Thu, 11 Aug 2011 16:33:32 +0200 apt (0.8.16~exp5ubuntu4) oneiric; urgency=low diff --git a/methods/mirror.cc b/methods/mirror.cc index 713dc211a..7f28c04cb 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -8,6 +8,7 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include #include #include #include @@ -134,9 +135,24 @@ bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str) string fetch = BaseUri; fetch.replace(0,strlen("mirror://"),"http://"); +#if 0 // no need for this, the getArchitectures() will also include the main + // arch + // append main architecture + fetch += "?arch=" + _config->Find("Apt::Architecture"); +#endif + + // append all architectures + std::vector vec = APT::Configuration::getArchitectures(); + for (std::vector::const_iterator I = vec.begin(); + I != vec.end(); I++) + if (I == vec.begin()) + fetch += "?arch" + (*I); + else + fetch += "&arch=" + (*I); + // append the dist as a query string if (Dist != "") - fetch += "?dist=" + Dist; + fetch += "&dist=" + Dist; if(Debug) clog << "MirrorMethod::DownloadMirrorFile(): '" << fetch << "'" -- cgit v1.2.3