]> git.saurik.com Git - apt.git/commitdiff
init the pkgTagFile with the size of the Release file
authorDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 13 Aug 2013 19:46:32 +0000 (21:46 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 15 Aug 2013 15:39:24 +0000 (17:39 +0200)
Release files are basically one big Section, so we might safe some
Resize circles by starting with the filesize.

Git-Dch: Ignore

apt-pkg/deb/deblistparser.cc
apt-pkg/indexrecords.cc

index c2707d0a505fd35d71b13d96a334ee19967bddf0..87aab6ee2b6f0ac2019ce74a98af7921e9e8bd36 100644 (file)
@@ -805,7 +805,7 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
    map_ptrloc const storage = WriteUniqString(component);
    FileI->Component = storage;
 
-   pkgTagFile TagFile(&File);
+   pkgTagFile TagFile(&File, File.Size());
    pkgTagSection Section;
    if (_error->PendingError() == true || TagFile.Step(Section) == false)
       return false;
index 6d89949a092d89fd1fea98536b0f3f408cdd6daf..8a72ca15182f3f31203da6b8d5b08e6e6b1698f4 100644 (file)
@@ -62,7 +62,7 @@ bool indexRecords::Load(const string Filename)                                /*{{{*/
    if (OpenMaybeClearSignedFile(Filename, Fd) == false)
       return false;
 
-   pkgTagFile TagFile(&Fd);
+   pkgTagFile TagFile(&Fd, Fd.Size());
    if (_error->PendingError() == true)
    {
       strprintf(ErrorText, _("Unable to parse Release file %s"),Filename.c_str());