summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-05-09 09:09:12 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-05-09 09:09:12 +0000
commit77a7df0e00b10252abb2fe52a083d53d5878ab11 (patch)
tree104a07616db9646bfd66412b1f456309e9d87fca
parent26d276459901fea7209203ec84403bb7934fb869 (diff)
* another bug in QueueNextDiff fixed
-rw-r--r--apt-pkg/acquire-item.cc6
-rw-r--r--po/apt-all.pot10
2 files changed, 9 insertions, 7 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index fff55f7b5..79e0b1898 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -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)
diff --git a/po/apt-all.pot b/po/apt-all.pot
index 496c96f95..ad94b8a39 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: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 ""