Michael Vogt лет назад: 21
Родитель
Сommit
26d2764599
2 измененных файлов с 11 добавлено и 11 удалено
  1. 6 6
      apt-pkg/acquire-item.cc
  2. 5 5
      po/apt-all.pot

+ 6 - 6
apt-pkg/acquire-item.cc

@@ -287,13 +287,13 @@ bool pkgAcqIndexDiffs::QueueNextDiff()
    SHA1.AddFD(fd.Fd(), fd.Size());
    SHA1.AddFD(fd.Fd(), fd.Size());
    string local_sha1 = string(SHA1.Result());
    string local_sha1 = string(SHA1.Result());
 
 
-   // see if we have a patch for it, the patch list must be ordered
+   // remove all patches until the next matching patch is found
+   // this requires the Index file to be ordered
    for(vector<DiffInfo>::iterator I=available_patches.begin();
    for(vector<DiffInfo>::iterator I=available_patches.begin();
-       I != available_patches.end(); I++) {
-      // if the patch does not fit, it's not interessting
-      if((*I).sha1 != local_sha1)
-	 available_patches.erase(I);
-   }
+       (*I).sha1 == local_sha1 || I != available_patches.end(); 
+       I++) 
+      available_patches.erase(I);
+   
 
 
    // error checking and falling back if no patch was found
    // error checking and falling back if no patch was found
    if(available_patches.size() == 0) { 
    if(available_patches.size() == 0) { 

+ 5 - 5
po/apt-all.pot

@@ -2251,31 +2251,31 @@ msgstr ""
 msgid "rename failed, %s (%s -> %s)."
 msgid "rename failed, %s (%s -> %s)."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:502 apt-pkg/acquire-item.cc:1161
+#: apt-pkg/acquire-item.cc:532 apt-pkg/acquire-item.cc:1197
 msgid "MD5Sum mismatch"
 msgid "MD5Sum mismatch"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:975
+#: apt-pkg/acquire-item.cc:1011
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "I wasn't able to locate a file for the %s package. This might mean you need "
 "I wasn't able to locate a file for the %s package. This might mean you need "
 "to manually fix this package. (due to missing arch)"
 "to manually fix this package. (due to missing arch)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:1028
+#: apt-pkg/acquire-item.cc:1064
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "I wasn't able to locate file for the %s package. This might mean you need to "
 "I wasn't able to locate file for the %s package. This might mean you need to "
 "manually fix this package."
 "manually fix this package."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:1064
+#: apt-pkg/acquire-item.cc:1100
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "The package index files are corrupted. No Filename: field for package %s."
 "The package index files are corrupted. No Filename: field for package %s."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:1151
+#: apt-pkg/acquire-item.cc:1187
 msgid "Size mismatch"
 msgid "Size mismatch"
 msgstr ""
 msgstr ""