Просмотр исходного кода

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.
David Kalnischkies лет назад: 11
Родитель
Сommit
12796fa241
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      apt-pkg/acquire-item.cc

+ 2 - 0
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		/*{{{*/