瀏覽代碼

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 :)
Michael Vogt 12 年之前
父節點
當前提交
e7d37fac63
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8 2
      apt-pkg/acquire-item.cc

+ 8 - 2
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?