X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/094a497dd2dba1f47157e07d57f97c338a5ddaa0..00b47c98ca4a4349686a082eba6d77decbb03a4d:/apt-pkg/orderlist.h diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h index 2065fc4c8..59949f106 100644 --- a/apt-pkg/orderlist.h +++ b/apt-pkg/orderlist.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: orderlist.h,v 1.2 1998/07/12 23:58:29 jgg Exp $ +// $Id: orderlist.h,v 1.8 2000/01/16 08:45:47 jgg Exp $ /* ###################################################################### Order List - Represents and Manipulates an ordered list of packages. @@ -48,17 +48,20 @@ class pkgOrderList // State Package **End; Package **List; + Package **AfterList; + Package **AfterEnd; + string *FileList; DepIterator Loops[20]; int LoopCount; int Depth; - unsigned char *Flags; + unsigned short *Flags; // Main visit function bool VisitNode(PkgIterator Pkg); bool VisitDeps(DepFunc F,PkgIterator Pkg); bool VisitRDeps(DepFunc F,PkgIterator Pkg); bool VisitRProvides(DepFunc F,VerIterator Ver); - bool VisitProvides(DepIterator Pkg); + bool VisitProvides(DepIterator Pkg,bool Critical); // Dependency checking functions. bool DepUnPackCrit(DepIterator D); @@ -87,8 +90,9 @@ class pkgOrderList enum Flags {Added = (1 << 0), AddPending = (1 << 1), Immediate = (1 << 2), Loop = (1 << 3), UnPacked = (1 << 4), Configured = (1 << 5), - Removed = (1 << 6), + Removed = (1 << 6), // Early Remove InList = (1 << 7), + After = (1 << 8), States = (UnPacked | Configured | Removed)}; // Flag manipulators @@ -97,9 +101,11 @@ class pkgOrderList void Flag(PkgIterator Pkg,unsigned long State, unsigned long F) {Flags[Pkg->ID] = (Flags[Pkg->ID] & (~F)) | State;}; inline void Flag(PkgIterator Pkg,unsigned long F) {Flags[Pkg->ID] |= F;}; inline void Flag(Package *Pkg,unsigned long F) {Flags[Pkg->ID] |= F;}; - inline bool IsNow(PkgIterator Pkg) {return (Flags[Pkg->ID] & States) == 0;}; + inline bool IsNow(PkgIterator Pkg) {return (Flags[Pkg->ID] & (States & (~Removed))) == 0;}; + bool IsMissing(PkgIterator Pkg); void WipeFlags(unsigned long F); - + void SetFileList(string *FileList) {this->FileList = FileList;}; + // Accessors inline iterator begin() {return List;}; inline iterator end() {return End;}; @@ -111,7 +117,7 @@ class pkgOrderList // Ordering modes bool OrderCritical(); - bool OrderUnpack(); + bool OrderUnpack(string *FileList = 0); bool OrderConfigure(); int Score(PkgIterator Pkg);