diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-06-07 15:54:23 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-06-07 15:54:23 +0200 |
commit | 479262a7561061e42c8023779b67d419fce1cc9c (patch) | |
tree | d995036f4d5489e6e46820c45ca8b743c7b22c9c /methods/mirror.cc | |
parent | 72dcdb508bc52838047f72413f050bf0439435fb (diff) |
append the dist (e.g. sid, wheezy) as a query string when
asking for a suitable mirror
Diffstat (limited to 'methods/mirror.cc')
-rw-r--r-- | methods/mirror.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/methods/mirror.cc b/methods/mirror.cc index 8a7228def..713dc211a 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -134,6 +134,10 @@ bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str) string fetch = BaseUri; fetch.replace(0,strlen("mirror://"),"http://"); + // append the dist as a query string + if (Dist != "") + fetch += "?dist=" + Dist; + if(Debug) clog << "MirrorMethod::DownloadMirrorFile(): '" << fetch << "'" << " to " << MirrorFile << endl; @@ -339,6 +343,7 @@ string MirrorMethod::GetMirrorFileName(string mirror_uri_str) if(Debug) std::cerr << "found BaseURI: " << uristr << std::endl; BaseUri = uristr.substr(0,uristr.size()-1); + Dist = (*I)->GetDist(); } } // get new file |