]> git.saurik.com Git - apt.git/commitdiff
run acquire transactions only once
authorDavid Kalnischkies <david@kalnischkies.de>
Sat, 18 Oct 2014 15:21:45 +0000 (17:21 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 20 Oct 2014 08:37:46 +0000 (10:37 +0200)
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

index 5c1e63af70e1b33c266d239fd2d105dbedabb96a..78402249c18b0602ca93a3d960e0cab1a0450c33 100644 (file)
@@ -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                /*{{{*/