summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-02-15 15:17:52 -0800
committerSam Bingner <sam@bingner.com>2019-08-17 12:47:30 -1000
commitf8a7209230c32d80b870cbc122364c4f204cfe2c (patch)
tree694fc709808a6a0af42549fe6a803dbbf6bde659
parentdbd60d2a7e0f02c38afff27efea81178aa6b86a0 (diff)
Don't download "optional" files not in Release :/.
-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 bd1c5bd82..fbd561107 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1607,7 +1607,7 @@ void pkgAcqMetaClearSig::QueueIndexes(bool const verify) /*{{{*/
}
// 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;
@@ -1723,6 +1723,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);
}