summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-09-26 18:13:48 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-09-26 18:13:48 +0200
commite7d37fac6328bba86fa183edc284ac629f7c03e4 (patch)
tree59f5c140f7ddf48ab82d0035a1eb070f8264311c
parente31a89e668596ea86c8f3a08429cd2f48286e734 (diff)
Do not download Packages/Sources files on I-M-S hit of the Release file
With this branch we know that the data in the lists directory is always what the release file says, so if the Release file is unchanged, then there is no need to queue the download of the other indexfiles as they will be unchanged too (or broken :)
-rw-r--r--apt-pkg/acquire-item.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 5bfc72adf..9d9aec4d0 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1750,8 +1750,14 @@ void pkgAcqMetaIndex::AuthDone(string Message) /*{{{*/
}
#endif
- // Download further indexes with verification
- QueueIndexes(true);
+ // Download further indexes with verification
+ //
+ // we do not need to download indexfiles if the Release file has not
+ // changed because without a changed release file there are no new hashes
+ // and we ensure that the repository is always "complete" (i.e. all
+ // that is in the release file is downloaded)
+ if(IMSHit == false)
+ QueueIndexes(true);
#if 0
// is it a clearsigned MetaIndex file?