diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-01-20 14:53:52 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-01-20 14:53:52 +0100 |
commit | fe0f7911b650918e1d511b3453664a07f6d966d0 (patch) | |
tree | 6cf87ad25812aa318624fadbc814875e58f4b4f1 /apt-pkg/indexrecords.cc | |
parent | 248ec5ab008a1dfa5bf441b0d40b6c1859954746 (diff) |
- try downloading clearsigned InRelease before trying Release.gpg
* apt-pkg/deb/deblistparser.cc:
- rewrite LoadReleaseInfo to cope with clearsigned Releasefiles
Diffstat (limited to 'apt-pkg/indexrecords.cc')
-rw-r--r-- | apt-pkg/indexrecords.cc | 17 |
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"); |