diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 8 | ||||
-rw-r--r-- | apt-pkg/packagemanager.cc | 12 | ||||
-rw-r--r-- | apt-pkg/pkgcache.h | 5 | ||||
-rw-r--r-- | apt-pkg/tagfile.cc | 17 |
4 files changed, 26 insertions, 16 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 82d4f3ee9..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.16 1999/02/08 07:30:50 jgg Exp $ +// $Id: deblistparser.cc,v 1.17 1999/02/21 08:38:53 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -119,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; diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 1b58cc25d..3b09871e5 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: packagemanager.cc,v 1.13 1999/02/19 07:56:07 jgg Exp $ +// $Id: packagemanager.cc,v 1.14 1999/02/21 08:38:53 jgg Exp $ /* ###################################################################### Package Manager - Abstacts the package manager @@ -130,8 +130,9 @@ bool pkgPackageManager::CreateOrderList() // Generate the list of affected packages and sort it for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { - // Mark the package for immediate configuration - if ((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential && + // Mark the package and its dependends for immediate configuration + if (((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential || + (I->Flags & pkgCache::Flag::Important) == pkgCache::Flag::Important) && NoImmConfigure == false) { List->Flag(I,pkgOrderList::Immediate); @@ -158,10 +159,7 @@ bool pkgPackageManager::CreateOrderList() continue; // Append it to the list - List->push_back(I); - - if ((I->Flags & pkgCache::Flag::ImmediateConf) == pkgCache::Flag::ImmediateConf) - List->Flag(I,pkgOrderList::Immediate); + List->push_back(I); } return true; diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index ce9c866fb..4e4bf0290 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcache.h,v 1.16 1999/02/01 02:22:11 jgg Exp $ +// $Id: pkgcache.h,v 1.17 1999/02/21 08:38:53 jgg Exp $ /* ###################################################################### Cache - Structure definitions for the cache file @@ -80,8 +80,7 @@ class pkgCache struct Flag { - enum PkgFlags {Auto=(1<<0),New=(1<<1),Obsolete=(1<<2),Essential=(1<<3), - ImmediateConf=(1<<4)}; + enum PkgFlags {Auto=(1<<0),Essential=(1<<3),Important=(1<<4)}; enum PkgFFlags {NotSource=(1<<0),NotAutomatic=(1<<1)}; }; diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 9a581c3e8..5d45b59bc 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: tagfile.cc,v 1.22 1999/01/31 21:52:27 jgg Exp $ +// $Id: tagfile.cc,v 1.23 1999/02/21 08:38:53 jgg Exp $ /* ###################################################################### Fast scanner for RFC-822 type header information @@ -46,7 +46,7 @@ bool pkgTagFile::Step(pkgTagSection &Tag) return false; if (Tag.Scan(Start,End - Start) == false) - return _error->Error("Unable to parse package file %s",Fd.Name().c_str()); + return _error->Error("Unable to parse package file %s (1)",Fd.Name().c_str()); } Start += Tag.size(); iOffset += Tag.size(); @@ -118,9 +118,17 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) if (Fill() == false) return false; + + if (Tag.Scan(Start,End - Start) == true) + return true; + + // This appends a double new line (for the real eof handling) + if (Fill() == false) + return false; if (Tag.Scan(Start,End - Start) == false) - return _error->Error("Unable to parse package file"); + return _error->Error("Unable to parse package file %s (2)",Fd.Name().c_str()); + return true; } /*}}}*/ @@ -155,6 +163,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) if (Stop == 0) return false; + for (; Stop[1] == '\r' && Stop+1 < End; Stop++); // Double newline marks the end of the record @@ -167,7 +176,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) Stop++; } - + return false; } /*}}}*/ |