X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/afb1e2e3bb580077c6c917e6ea98baad8f3c39b3..22dcc318d978813b3c4d1ae1a1f41933d0e1d69b:/apt-pkg/depcache.h diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index f974bfacf..619daf8f6 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -63,6 +63,7 @@ class pkgDepCache : protected pkgCache::Namespace enum VersionTypes {NowVersion, InstallVersion, CandidateVersion}; enum ModeList {ModeDelete = 0, ModeKeep = 1, ModeInstall = 2}; + struct StateCache { // Epoch stripped text versions of the two version fields @@ -79,9 +80,9 @@ class pkgDepCache : protected pkgCache::Namespace unsigned short Flags; unsigned short iFlags; // Internal flags - // Traversal status and state for automatic removal - unsigned char DirtyState; - unsigned char AutomaticRemove; + // mark and sweep flags + bool Marked; + bool Garbage; // Various tree indicators signed char Status; // -1,0,1,2 @@ -103,7 +104,6 @@ class pkgDepCache : protected pkgCache::Namespace inline bool NowBroken() const {return (DepState & DepNowMin) != DepNowMin;}; inline bool InstBroken() const {return (DepState & DepInstMin) != DepInstMin;}; inline bool Install() const {return Mode == ModeInstall;}; - inline unsigned char Dirty() const {return DirtyState;}; inline VerIterator InstVerIter(pkgCache &Cache) {return VerIterator(Cache,InstallVer);}; inline VerIterator CandidateVerIter(pkgCache &Cache) @@ -194,10 +194,13 @@ class pkgDepCache : protected pkgCache::Namespace unsigned long Depth = 0); void SetReInstall(PkgIterator const &Pkg,bool To); void SetCandidateVersion(VerIterator TargetVer); - void SetDirty(PkgIterator const &Pkg, pkgCache::State::PkgRemoveState To); // This is for debuging void Update(OpProgress *Prog = 0); + + // read persistent states + bool readStateFile(OpProgress *prog); + bool writeStateFile(OpProgress *prog); // Size queries inline double UsrSize() {return iUsrSize;};