summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-02-15 15:17:52 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-02-15 15:17:52 -0800
commitfb97f9603ada7961f30b123962a11981aee475a3 (patch)
treef240e7f792f4f652a964db4aa981da0fcfba52bc /apt-pkg
parentc7db7b2f8740c8c1ad859e9ad8f426fe601b5f04 (diff)
Don't download "optional" files not in Release :/.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index f27ef28d3..82bf8a1eb 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1411,7 +1411,7 @@ void pkgAcqMetaClearSig::QueueIndexes(bool const verify) /*{{{*/
if (TransactionManager->MetaIndexParser->Exists(Target.MetaKey) == false)
{
// optional targets that we do not have in the Release file are skipped
- if (hasHashes == true && Target.IsOptional)
+ if (Target.IsOptional)
{
new CleanupItem(Owner, TransactionManager, Target);
continue;
@@ -1535,6 +1535,13 @@ void pkgAcqMetaClearSig::QueueIndexes(bool const verify) /*{{{*/
}
else
{
+ // if the source wanted these files they should have given us a release file :/
+ if (Target.IsOptional)
+ {
+ new CleanupItem(Owner, TransactionManager, Target);
+ continue;
+ }
+
// if we have no file to patch, no point in trying
trypdiff &= (GetExistingFilename(GetFinalFileNameFromURI(Target.URI)).empty() == false);
}