summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-07-18 23:41:29 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-07-21 08:17:17 +0200
commit47aca3cfc17ee23c37693b4e53c675a74b38decd (patch)
tree8112560d31700e67429e0a2a4a479e22cd63d424 /apt-pkg/acquire-item.cc
parent564720959e4ae47921b795fe6c5ce46e1e1bdc95 (diff)
add pkgAcquire::TransactionHasError()
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index bd11ba66c..81afdf4b1 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1421,12 +1421,12 @@ void pkgAcqMetaSig::Done(string Message,unsigned long long Size, HashStringList
DestFile += URItoFileName(RealURI);
// queue a pkgAcqMetaIndex to be verified against the sig we just retrieved
- pkgAcqMetaIndex *mi = new pkgAcqMetaIndex(
+ pkgAcqMetaIndex *metaindex = new pkgAcqMetaIndex(
Owner, MetaIndexURI, MetaIndexURIDesc,
MetaIndexShortDesc, DestFile, IndexTargets,
MetaIndexParser);
- TransactionID = (unsigned long)mi;
+ TransactionID = (unsigned long)metaindex;
}
/*}}}*/
void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
@@ -1908,7 +1908,8 @@ void pkgAcqMetaIndex::Finished()
{
if(_config->FindB("Debug::Acquire::Transaction", false) == true)
std::clog << "Finished: " << DestFile <<std::endl;
- Owner->CommitTransaction((unsigned long)this);
+ if(Owner->TransactionHasError((unsigned long)this) == false)
+ Owner->CommitTransaction((unsigned long)this);
}