X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/a18268780fc83b9f62575021b9503a322dbee9b4..6e6ded608e8250c22cefe03c6f9214401cb6de7c:/apt-pkg/deb/deblistparser.cc diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index cf81690e2..b11d2531c 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: deblistparser.cc,v 1.29 2003/09/22 04:16:26 mdz Exp $ +// $Id: deblistparser.cc,v 1.29.2.5 2004/01/06 01:43:44 mdz Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -377,12 +377,12 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop, const char *End = I; for (; End > Start && isspace(End[-1]); End--); - Ver = string(Start,End-Start); + Ver.assign(Start,End-Start); I++; } else { - Ver = string(); + Ver.clear(); Op = pkgCache::Dep::NoOp; } @@ -564,16 +564,23 @@ bool debListParser::Step() // --------------------------------------------------------------------- /* */ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI, - FileFd &File) + FileFd &File, string component) { - pkgTagFile Tags(&File); + pkgTagFile Tags(&File, File.Size() + 256); // XXX pkgTagSection Section; if (Tags.Step(Section) == false) return false; + //mvo: I don't think we need to fill that in (it's unused since apt-0.6) + //FileI->Architecture = WriteUniqString(Arch); + + // apt-secure does no longer download individual (per-section) Release + // file. to provide Component pinning we use the section name now + FileI->Component = WriteUniqString(component); + const char *Start; const char *Stop; - if (Section.Find("Archive",Start,Stop) == true) + if (Section.Find("Suite",Start,Stop) == true) FileI->Archive = WriteUniqString(Start,Stop - Start); if (Section.Find("Component",Start,Stop) == true) FileI->Component = WriteUniqString(Start,Stop - Start); @@ -589,7 +596,7 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI, if (Section.FindFlag("NotAutomatic",FileI->Flags, pkgCache::Flag::NotAutomatic) == false) _error->Warning("Bad NotAutomatic flag"); - + return !_error->PendingError(); } /*}}}*/