summaryrefslogtreecommitdiff
path: root/methods/mirror.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-08-15 14:21:31 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-08-15 14:21:31 +0200
commitd0f1646ae06ca5710b015662b9244e277dce73fa (patch)
treea05bac27eed31cd7d867c524fac71dc57b2d3cdd /methods/mirror.cc
parentc5ca2c52a98fcb50de6429cf370ed5b6b7602a00 (diff)
parentabcbf0af368cdda142b5d7cc03f793cfbdf23028 (diff)
merged from lp:~mvo/apt/mvo
Diffstat (limited to 'methods/mirror.cc')
-rw-r--r--methods/mirror.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/methods/mirror.cc b/methods/mirror.cc
index cb24a06cf..a3e60ab15 100644
--- a/methods/mirror.cc
+++ b/methods/mirror.cc
@@ -8,6 +8,7 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/acquire-method.h>
#include <apt-pkg/acquire-item.h>
@@ -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<std::string> vec = APT::Configuration::getArchitectures();
+ for (std::vector<std::string>::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 << "'"