diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-03-16 08:24:03 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-03-16 08:24:03 +0100 |
commit | 4d8c4b509454d494e0b36f91ecb82f1ce7344923 (patch) | |
tree | 59fedcfe8142aba694b9accfadea2b8690d95353 /apt-pkg/acquire-worker.cc | |
parent | 30cd298887e196992c155d63ec5a9dc4bafe05b4 (diff) | |
parent | f71c0f2e83d849b85c795a2a4a0056d265abf904 (diff) |
* merged from debian/sid, this adds important fixes in the
apt mirror method
* mirror method:
- when downloading data, show the mirror being used
- randomize mirror list after download in a host specific way
to ensure that the load is evenly spreaded accross the mirrors
- fix some missing "Fail-Ignore"
Diffstat (limited to 'apt-pkg/acquire-worker.cc')
-rw-r--r-- | apt-pkg/acquire-worker.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index 4f0b52af9..ddd8e3101 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -199,6 +199,17 @@ bool pkgAcquire::Worker::RunMessages() pkgAcquire::Queue::QItem *Itm = 0; if (URI.empty() == false) Itm = OwnerQ->FindItem(URI,this); + + // update used mirror + string UsedMirror = LookupTag(Message,"UsedMirror", ""); + if (!UsedMirror.empty() && + Itm && + Itm->Description.find(" ") != string::npos) + { + Itm->Description.replace(0, Itm->Description.find(" "), UsedMirror); + // FIXME: will we need this as well? + //Itm->ShortDesc = UsedMirror; + } // Determine the message number and dispatch switch (Number) |