diff options
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index d820756ca..b2e578629 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -281,6 +281,12 @@ bool pkgAcquire::Item::QueueURI(pkgAcquire::ItemDesc &Item) for a hashsum mismatch to happen which helps nobody) */ bool pkgAcqTransactionItem::QueueURI(pkgAcquire::ItemDesc &Item) { + if (TransactionManager->State != TransactionStarted) + { + if (_config->FindB("Debug::Acquire::Transaction", false)) + std::clog << "Skip " << Target.URI << " as transaction was already dealt with!" << std::endl; + return false; + } std::string const FinalFile = GetFinalFilename(); if (TransactionManager != NULL && TransactionManager->IMSHit == true && FileExists(FinalFile) == true) @@ -866,6 +872,8 @@ void pkgAcqMetaBase::AbortTransaction() for (std::vector<pkgAcqTransactionItem*>::iterator I = Transaction.begin(); I != Transaction.end(); ++I) { + if ((*I)->Status != pkgAcquire::Item::StatFetching) + Owner->Dequeue(*I); (*I)->TransactionState(TransactionAbort); } Transaction.clear(); |