]> git.saurik.com Git - apt.git/commitdiff
* another bug in QueueNextDiff fixed
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 9 May 2005 09:09:12 +0000 (09:09 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 9 May 2005 09:09:12 +0000 (09:09 +0000)
apt-pkg/acquire-item.cc
po/apt-all.pot

index fff55f7b55acda96562ad0f11511e8cb2e9b576d..79e0b18986348e325e21a823dd3387e36546bf38 100644 (file)
@@ -290,10 +290,9 @@ bool pkgAcqIndexDiffs::QueueNextDiff()
    // 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();
-       (*I).sha1 == local_sha1 || I != available_patches.end()
+       I != available_patches.end() && (*I).sha1 != local_sha1
        I++) 
       available_patches.erase(I);
-   
 
    // error checking and falling back if no patch was found
    if(available_patches.size() == 0) { 
@@ -356,14 +355,17 @@ bool pkgAcqIndexDiffs::ParseIndexDiff(string IndexDiffFile)
       bool found = false;
       while(hist >> d.sha1 >> size >> d.file) {
         d.size = atoi(size.c_str());
+        // read until the first match is found
         if(d.sha1 == local_sha1) 
            found=true;
+        // from that point on, we probably need all diffs
         if(found) {
            if(Debug)
               std::clog << "Need to get diff: " << d.file << std::endl;
            available_patches.push_back(d);
         }
       }
+
       // no information how to get the patches, bail out
       if(!found) {
         if(Debug)
index 496c96f950499e7e0d14e1b8c765ad88e805dfbd..ad94b8a39eecfdbc782c8a5d5226babce79bcbf4 100644 (file)
@@ -2251,31 +2251,31 @@ msgstr ""
 msgid "rename failed, %s (%s -> %s)."
 msgstr ""
 
-#: apt-pkg/acquire-item.cc:532 apt-pkg/acquire-item.cc:1197
+#: apt-pkg/acquire-item.cc:537 apt-pkg/acquire-item.cc:1202
 msgid "MD5Sum mismatch"
 msgstr ""
 
-#: apt-pkg/acquire-item.cc:1011
+#: apt-pkg/acquire-item.cc:1016
 #, c-format
 msgid ""
 "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)"
 msgstr ""
 
-#: apt-pkg/acquire-item.cc:1064
+#: apt-pkg/acquire-item.cc:1069
 #, c-format
 msgid ""
 "I wasn't able to locate file for the %s package. This might mean you need to "
 "manually fix this package."
 msgstr ""
 
-#: apt-pkg/acquire-item.cc:1100
+#: apt-pkg/acquire-item.cc:1105
 #, c-format
 msgid ""
 "The package index files are corrupted. No Filename: field for package %s."
 msgstr ""
 
-#: apt-pkg/acquire-item.cc:1187
+#: apt-pkg/acquire-item.cc:1192
 msgid "Size mismatch"
 msgstr ""