X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b0b4efb96c3fad90bf978d61b230501bcdadff3d..e5a1f2ff4cd1300364c7c644958583a8af704173:/apt-pkg/deb/deblistparser.cc diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 0e5be1266..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.11 1998/12/14 02:23:47 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; @@ -468,7 +473,11 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI, FileI->Label = WriteUniqString(Start,Stop - Start); if (Section.Find("Architecture",Start,Stop) == true) FileI->Architecture = WriteUniqString(Start,Stop - Start); - + + if (Section.FindFlag("NotAutomatic",FileI->Flags, + pkgCache::Flag::NotAutomatic) == false) + _error->Warning("Bad NotAutomatic flag"); + return !_error->PendingError(); } /*}}}*/