summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-07-06 11:04:24 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2017-07-07 16:25:44 +0200
commitd10502c803c988c8a5459b191c35acb12809b343 (patch)
treebb0c3e09a34020c161f311589dbba22e50bf8204 /apt-pkg
parent418a8a49cad9a2b28d914e76b8cd2e0e96d2fe70 (diff)
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.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc2
1 files changed, 2 insertions, 0 deletions
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<pkgAcqTransactionItem*>::iterator I = Transaction.begin();
I != Transaction.end(); ++I)
{
+ (*I)->ExpectedAdditionalItems = 0;
if ((*I)->Status != pkgAcquire::Item::StatFetching)
Owner->Dequeue(*I);
(*I)->TransactionState(TransactionAbort);