diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-11-05 01:51:44 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-11-05 12:21:33 +0100 |
commit | f01f5d911d6a9731893865bb1ec617c5038add3e (patch) | |
tree | 8701432e7810433218ec1a7d74fdca5076295a37 /apt-pkg/acquire-item.cc | |
parent | 4453cfdcf42f7fe6859bb0fc6b310a2a391bee77 (diff) |
"support" unsigned Release files without hashes again
This 'ignores' the component Release files you can find in Debian
alongside the binary-* directories, which isn't exactly a common
usecase, but it worked before, so lets support it again as this isn't
worse than a valid Release file which is unsigned.
Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 9d1c2cc61..2c081261d 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -213,7 +213,7 @@ APT_CONST bool pkgAcqTransactionItem::HashesRequired() const Only repositories without a Release file can (obviously) not have hashes – and they are very uncommon and strongly discouraged */ return TransactionManager->MetaIndexParser != NULL && - TransactionManager->MetaIndexParser->GetLoadedSuccessfully() != metaIndex::TRI_UNSET; + TransactionManager->MetaIndexParser->GetLoadedSuccessfully() == metaIndex::TRI_YES; } HashStringList pkgAcqTransactionItem::GetExpectedHashes() const { @@ -1669,10 +1669,11 @@ void pkgAcqMetaSig::Failed(string const &Message,pkgAcquire::MethodConfig const // we parse the indexes here because at this point the user wanted // a repository that may potentially harm him - if (TransactionManager->MetaIndexParser->Load(MetaIndex->DestFile, &ErrorText) == false || MetaIndex->VerifyVendor(Message) == false) + bool const GoodLoad = TransactionManager->MetaIndexParser->Load(MetaIndex->DestFile, &ErrorText); + if (MetaIndex->VerifyVendor(Message) == false) /* expired Release files are still a problem you need extra force for */; else - MetaIndex->QueueIndexes(true); + MetaIndex->QueueIndexes(GoodLoad); TransactionManager->TransactionStageCopy(MetaIndex, MetaIndex->DestFile, MetaIndex->GetFinalFilename()); } |