summaryrefslogtreecommitdiff
path: root/apt-pkg/indexrecords.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/indexrecords.cc')
-rw-r--r--apt-pkg/indexrecords.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index eb9a36866..10e154ad2 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -55,14 +55,17 @@ bool indexRecords::Load(const string Filename) /*{{{*/
}
pkgTagSection Section;
- if (TagFile.Step(Section) == false)
- {
- strprintf(ErrorText, _("No sections in Release file %s"), Filename.c_str());
- return false;
- }
-
const char *Start, *End;
- Section.Get (Start, End, 0);
+ // Skip over sections beginning with ----- as this is an idicator for clearsigns
+ do {
+ if (TagFile.Step(Section) == false)
+ {
+ strprintf(ErrorText, _("No sections in Release file %s"), Filename.c_str());
+ return false;
+ }
+
+ Section.Get (Start, End, 0);
+ } while (End - Start > 5 && strncmp(Start, "-----", 5) == 0);
Suite = Section.FindS("Suite");
Dist = Section.FindS("Codename");