From d10502c803c988c8a5459b191c35acb12809b343 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 6 Jul 2017 11:04:24 +0200 Subject: don't expect more downloads from failed transactions Progress only shows if we have an idea of how much files we will acquire, but if a transaction fails before we have got an idea we ended up never showing progress even through we know that a failed transaction will not download additional files. --- apt-pkg/acquire-item.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 975116d1a..f807178e6 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1102,11 +1102,13 @@ void pkgAcqMetaBase::AbortTransaction() case TransactionCommit: _error->Fatal("Transaction %s was already aborted and is now committed", TransactionManager->Target.URI.c_str()); return; } TransactionManager->State = TransactionAbort; + TransactionManager->ExpectedAdditionalItems = 0; // ensure the toplevel is in error state too for (std::vector::iterator I = Transaction.begin(); I != Transaction.end(); ++I) { + (*I)->ExpectedAdditionalItems = 0; if ((*I)->Status != pkgAcquire::Item::StatFetching) Owner->Dequeue(*I); (*I)->TransactionState(TransactionAbort); -- cgit v1.2.3