// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: depcache.h,v 1.3 1998/07/12 23:58:25 jgg Exp $
+// $Id: depcache.h,v 1.5 1998/10/02 04:39:45 jgg Exp $
/* ######################################################################
DepCache - Dependency Extension data for the cache
#endif
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/progress.h>
class pkgDepCache : public pkgCache
{
inline bool Delete() const {return Mode == ModeDelete;};
inline bool Keep() const {return Mode == ModeKeep;};
inline bool Upgrade() const {return Status > 0 && Mode == ModeInstall;};
- inline bool Upgradable() const {return Status == 1;};
+ inline bool Upgradable() const {return Status >= 1;};
inline bool Downgrade() const {return Status < 0;};
inline bool Held() const {return Status != 0 && Keep();};
inline bool NowBroken() const {return (DepState & DepNowMin) != DepNowMin;};
void BuildGroupOrs(VerIterator const &V);
void UpdateVerState(PkgIterator Pkg);
- bool Init();
+ bool Init(OpProgress *Prog);
protected:
void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true);
// This is for debuging
- void Update();
+ void Update(OpProgress *Prog = 0);
- // Hook to keep the extra data in sync
- virtual bool ReMap();
-
// Size queries
inline long UsrSize() {return iUsrSize;};
inline long DebSize() {return iDownloadSize;};
inline long BrokenCount() {return iBrokenCount;};
inline long BadCount() {return iBadCount;};
- pkgDepCache(MMap &Map);
+ pkgDepCache(MMap &Map,OpProgress &Prog);
virtual ~pkgDepCache();
};