summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-10-18 17:21:45 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-10-20 10:37:46 +0200
commit12796fa241ad6b0e8ccd1025a3723e18324e17b0 (patch)
tree9633434d2ed769cb84b64bff71b6ec2c46249155
parent3253294308f43ac179b43f32a842fc4029ec2041 (diff)
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.
-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 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 /*{{{*/