summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-03-14 11:34:32 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-03-14 11:34:32 +0100
commit196fd13629fc0f673b18735d633bdf69a3272590 (patch)
tree7217babb8ca4b9cf64d8ad0b9ea973fb30f7a6f4 /apt-pkg/acquire-worker.cc
parentd6cc7079e895e76ad9d086fcc6a40224dd41bb62 (diff)
* mirror method:
- when downloading data, show the mirror being used
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)