summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-08-09 17:40:57 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:27:59 +0200
commitdd676dc71e31c20f66d5b9d9ac1c5a4c8883cd79 (patch)
tree59132e28901c22f80033b7e7232bbdb93ccf67a5 /apt-pkg/acquire-worker.cc
parentcc480836c739e36dc0c741fa333248c0a8150ec7 (diff)
enhance "hit paywall" error message to mention the probable cause
Reporting errors from Done() is bad for progress reporting and such, so factoring this out is a good idea and we start with moving the supposed- to-be clearsigned file isn't clearsigned out first – improving the error message in the process as we use the same message for a similar case (NODATA) as this is what I have to look at with the venue wifi at DebCamp and the old errormessage doesn't really say anything.
Diffstat (limited to 'apt-pkg/acquire-worker.cc')
-rw-r--r--apt-pkg/acquire-worker.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index dc03a8870..2c84020fe 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -412,10 +412,13 @@ bool pkgAcquire::Worker::RunMessages()
consideredOkay = true;
if (consideredOkay == true)
+ consideredOkay = Owner->VerifyDone(Message, Config);
+ else // hashsum mismatch
+ Owner->Status = pkgAcquire::Item::StatAuthError;
+
+ if (consideredOkay == true)
{
Owner->Done(Message, ReceivedHashes, Config);
-
- // Log that we are done
if (Log != 0)
{
if (isIMSHit)
@@ -426,9 +429,7 @@ bool pkgAcquire::Worker::RunMessages()
}
else
{
- Owner->Status = pkgAcquire::Item::StatAuthError;
Owner->Failed(Message,Config);
-
if (Log != 0)
Log->Fail(Owner->GetItemDesc());
}