summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2011-03-15 09:19:23 +0100
committerMichael Vogt <mvo@debian.org>2011-03-15 09:19:23 +0100
commit9b248f58ed56094ed8be3aa0ba2aed776a3ff382 (patch)
tree59c609bee51ca2c3de0d2f4fde83850183523537 /apt-pkg/acquire-worker.cc
parent8f33789e26d2f66f48b310eda4a1543a7aba7fc6 (diff)
parentca0a660c3b63717ffec0305bba95af6930e62c34 (diff)
merged from lp:~mvo/apt/mvo
Diffstat (limited to 'apt-pkg/acquire-worker.cc')
-rw-r--r--apt-pkg/acquire-worker.cc11
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)