X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0dbb95d810308d8dd102fba0303eed657f9f1cd2..f44344b3075e2a93e3c17a09e7774e8391b42206:/apt-pkg/deb/deblistparser.cc diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 585006451..157a465f4 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.12 1998/12/14 06:54:43 jgg Exp $ +// $Id: deblistparser.cc,v 1.17 1999/02/21 08:38:53 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include /*}}}*/ @@ -44,7 +44,7 @@ string debListParser::Package() { string Result = Section.FindS("Package"); if (Result.empty() == true) - _error->Error("Encoutered a section with no Package: header"); + _error->Error("Encountered a section with no Package: header"); return Result; } /*}}}*/ @@ -65,6 +65,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) { // Parse the section Ver->Section = UniqFindTagWrite("Section"); + Ver->Arch = UniqFindTagWrite("Architecture"); // Archive Size Ver->Size = (unsigned)Section.FindI("Size"); @@ -118,8 +119,12 @@ bool debListParser::UsePackage(pkgCache::PkgIterator Pkg, Pkg->Section = UniqFindTagWrite("Section"); if (Section.FindFlag("Essential",Pkg->Flags,pkgCache::Flag::Essential) == false) return false; - if (Section.FindFlag("Immediate-Configure",Pkg->Flags,pkgCache::Flag::ImmediateConf) == false) + if (Section.FindFlag("Important",Pkg->Flags,pkgCache::Flag::Important) == false) return false; + + if (strcmp(Pkg.Name(),"apt") == 0) + Pkg->Flags |= pkgCache::Flag::Important; + if (ParseStatus(Pkg,Ver) == false) return false; return true; @@ -469,10 +474,9 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI, if (Section.Find("Architecture",Start,Stop) == true) FileI->Architecture = WriteUniqString(Start,Stop - Start); - unsigned long Fl = 0; - if (Section.FindFlag("NotAutomatic",Fl,1) == false) + if (Section.FindFlag("NotAutomatic",FileI->Flags, + pkgCache::Flag::NotAutomatic) == false) _error->Warning("Bad NotAutomatic flag"); - FileI->NotAutomatic = Fl; return !_error->PendingError(); }