summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-08-14 09:51:56 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-08-16 19:20:28 +0200
commit850ad02657c096fb227b38ef6d691fcf20acd619 (patch)
tree9435165774f71354c15705d3287df2c00be1139f /apt-pkg/acquire-worker.cc
parent9714d522056e5256f5a2de587d88eba7cb3291c2 (diff)
log with the failed item description, not with next try
The failure handling frequently changes URI & Description of the failed item to try a slightly different combination which might work, but the logging of the failure happens only afterwards as the same failure handling decides if this is a critical error or not so we need a backup here instead of potentially new content. A purely cosmetic issue, but can still be confusing for humans.
Diffstat (limited to 'apt-pkg/acquire-worker.cc')
-rw-r--r--apt-pkg/acquire-worker.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 7a4f8177f..aa1a2654e 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -464,6 +464,7 @@ bool pkgAcquire::Worker::RunMessages()
}
else
{
+ auto SavedDesc = Owner->GetItemDesc();
if (isDoomedItem(Owner) == false)
{
if (Message.find("\nFailReason:") == std::string::npos)
@@ -476,7 +477,7 @@ bool pkgAcquire::Worker::RunMessages()
Owner->Failed(Message,Config);
}
if (Log != nullptr)
- Log->Fail(Owner->GetItemDesc());
+ Log->Fail(SavedDesc);
}
}
ItemDone();
@@ -524,11 +525,11 @@ bool pkgAcquire::Worker::RunMessages()
Owner->Status = pkgAcquire::Item::StatAuthError;
else if (errTransient)
Owner->Status = pkgAcquire::Item::StatTransientNetworkError;
-
+ auto SavedDesc = Owner->GetItemDesc();
if (isDoomedItem(Owner) == false)
Owner->Failed(Message,Config);
if (Log != nullptr)
- Log->Fail(Owner->GetItemDesc());
+ Log->Fail(SavedDesc);
}
ItemDone();