summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2013-08-13 21:46:32 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2013-08-15 17:39:24 +0200
commit233d79a51cc6b922b3f0be0f5c3b460f8ea50d36 (patch)
tree59d04c4fedf1695ab5a578b83f6ebf0e02d52ff9 /apt-pkg
parent488011fa99aee25bedb39ae2cc3115ad1ab000c0 (diff)
init the pkgTagFile with the size of the Release file
Release files are basically one big Section, so we might safe some Resize circles by starting with the filesize. Git-Dch: Ignore
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/deblistparser.cc2
-rw-r--r--apt-pkg/indexrecords.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index c2707d0a5..87aab6ee2 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -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;
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index 6d89949a0..8a72ca151 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -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());