From 12796fa241ad6b0e8ccd1025a3723e18324e17b0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 18 Oct 2014 17:21:45 +0200 Subject: run acquire transactions only once Transactions are run and completed from multiple places, so it happens for unsigned repos that the Release file was commited even if it was previously aborted (due to --no-allow-insecure-repositories). The reason is simply that the "failure" of getting an InRelease/Release.gpg is currently ignored, so that the acquire process believes that nothing bad happened and commits the transaction even though the same transaction was previously aborted. --- apt-pkg/acquire-item.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 5c1e63af7..78402249c 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1571,6 +1571,7 @@ void pkgAcqMetaBase::AbortTransaction() Rename(PartialFile, PartialFile + ".FAILED"); } } + Transaction.clear(); } /*}}}*/ // AcqMetaBase::TransactionHasError - Check for errors in Transaction /*{{{*/ @@ -1617,6 +1618,7 @@ void pkgAcqMetaBase::CommitTransaction() // mark that this transaction is finished (*I)->TransactionManager = 0; } + Transaction.clear(); } /*}}}*/ // AcqMetaBase::TransactionStageCopy - Stage a file for copying /*{{{*/ -- cgit v1.2.3