// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: packagemanager.h,v 1.6 1998/11/22 03:20:34 jgg Exp $
+// $Id: packagemanager.h,v 1.10 1999/07/20 05:53:33 jgg Exp $
/* ######################################################################
Package Manager - Abstacts the package manager
class pkgRecords;
class pkgPackageManager
{
+ public:
+
+ enum OrderResult {Completed,Failed,Incomplete};
+
protected:
string *FileNames;
pkgDepCache &Cache;
typedef pkgCache::Package Package;
bool DepAdd(pkgOrderList &Order,PkgIterator P,int Depth = 0);
- bool OrderInstall();
+ OrderResult OrderInstall();
bool CheckRConflicts(PkgIterator Pkg,DepIterator Dep,const char *Ver);
+ bool CreateOrderList();
// Analysis helpers
bool DepAlwaysTrue(DepIterator D);
// The Actuall installation implementation
virtual bool Install(PkgIterator /*Pkg*/,string /*File*/) {return false;};
virtual bool Configure(PkgIterator /*Pkg*/) {return false;};
- virtual bool Remove(PkgIterator /*Pkg*/) {return false;};
+ virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;};
virtual bool Go() {return true;};
+ virtual void Reset() {};
public:
-
+
// Main action members
bool GetArchives(pkgAcquire *Owner,pkgSourceList *Sources,
pkgRecords *Recs);
- bool DoInstall();
+ OrderResult DoInstall();
bool FixMissing();
pkgPackageManager(pkgDepCache &Cache);