// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: algorithms.cc,v 1.13 1998/12/06 03:41:25 jgg Exp $
+// $Id: algorithms.cc,v 1.14 1998/12/08 01:34:05 jgg Exp $
/* ######################################################################
Algorithms - A set of misc algorithms
// ---------------------------------------------------------------------
/* */
pkgSimulate::pkgSimulate(pkgDepCache &Cache) : pkgPackageManager(Cache),
- Sim(Cache)
+ Sim(Cache.GetMap())
{
Flags = new unsigned char[Cache.HeaderP->PackageCount];
memset(Flags,0,sizeof(*Flags)*Cache.HeaderP->PackageCount);
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: depcache.cc,v 1.9 1998/12/07 23:54:42 jgg Exp $
+// $Id: depcache.cc,v 1.10 1998/12/08 01:34:07 jgg Exp $
/* ######################################################################
Dependency Cache - Caches Dependency information.
{
if (_error->PendingError() == false)
Init(&Prog);
+}
+pkgDepCache::pkgDepCache(MMap &Map) :
+ pkgCache(Map), PkgState(0), DepState(0)
+{
+ if (_error->PendingError() == false)
+ Init(0);
}
/*}}}*/
// DepCache::~pkgDepCache - Destructor /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: depcache.h,v 1.7 1998/11/14 01:39:47 jgg Exp $
+// $Id: depcache.h,v 1.8 1998/12/08 01:34:10 jgg Exp $
/* ######################################################################
DepCache - Dependency Extension data for the cache
// This is for debuging
void Update(OpProgress *Prog = 0);
-
// Size queries
inline signed long UsrSize() {return iUsrSize;};
inline unsigned long BadCount() {return iBadCount;};
pkgDepCache(MMap &Map,OpProgress &Prog);
+ pkgDepCache(MMap &Map);
virtual ~pkgDepCache();
};
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: packagemanager.cc,v 1.8 1998/11/23 07:03:01 jgg Exp $
+// $Id: packagemanager.cc,v 1.9 1998/12/08 01:34:12 jgg Exp $
/* ######################################################################
Package Manager - Abstacts the package manager
if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure &&
Cache[Pkg].Keep() == true)
{
+ cout << "Bailing" << endl;
List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true)
if (SmartConfigure(Pkg) == false)
return _error->Error("Internal Error, Could not perform immediate configuraton");
return true;
}
-
+
/* See if this packages install version has any predependencies
that are not met by 'now' packages. */
for (DepIterator D = Cache[Pkg].InstVerIter(Cache).DependsList();
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.h,v 1.11 1998/12/07 07:26:20 jgg Exp $
+// $Id: pkgcache.h,v 1.12 1998/12/08 01:34:13 jgg Exp $
/* ######################################################################
Cache - Structure definitions for the cache file
virtual bool ReMap();
inline bool Sync() {return Map.Sync();};
+ inline MMap &GetMap() {return Map;};
// String hashing function (512 range)
inline unsigned long Hash(string S) const {return sHash(S);};