summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-05-09 07:59:17 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-05-09 07:59:17 +0000
commit26d276459901fea7209203ec84403bb7934fb869 (patch)
treeb5d8da8e1cf2646de2105f97f8b9b5291279ee43
parent94dc9d7d8bbf2f1351db26e4532327c6784ead96 (diff)
* fix a bug QueueNextDiff
-rw-r--r--apt-pkg/acquire-item.cc12
-rw-r--r--po/apt-all.pot10
2 files changed, 11 insertions, 11 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 81636902e..fff55f7b5 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -287,13 +287,13 @@ bool pkgAcqIndexDiffs::QueueNextDiff()
SHA1.AddFD(fd.Fd(), fd.Size());
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();
- 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
if(available_patches.size() == 0) {
diff --git a/po/apt-all.pot b/po/apt-all.pot
index 7c3774ed6..496c96f95 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -2251,31 +2251,31 @@ msgstr ""
msgid "rename failed, %s (%s -> %s)."
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"
msgstr ""
-#: apt-pkg/acquire-item.cc:975
+#: apt-pkg/acquire-item.cc:1011
#, 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:1028
+#: apt-pkg/acquire-item.cc:1064
#, 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:1064
+#: apt-pkg/acquire-item.cc:1100
#, c-format
msgid ""
"The package index files are corrupted. No Filename: field for package %s."
msgstr ""
-#: apt-pkg/acquire-item.cc:1151
+#: apt-pkg/acquire-item.cc:1187
msgid "Size mismatch"
msgstr ""