// -*- 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.
#include <apt-pkg/deblistparser.h>
#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
-#include <strutl.h>
+#include <apt-pkg/strutl.h>
#include <system.h>
/*}}}*/
{
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;
}
/*}}}*/
{
// Parse the section
Ver->Section = UniqFindTagWrite("Section");
+ Ver->Arch = UniqFindTagWrite("Architecture");
// Archive Size
Ver->Size = (unsigned)Section.FindI("Size");
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;
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();
}