merge my rred-rewrite branch & add it's changes to the changelog
[ntk/apt.git] / apt-pkg / packagemanager.h
index da1f21e..af1476b 100644 (file)
 #ifndef PKGLIB_PACKAGEMANAGER_H
 #define PKGLIB_PACKAGEMANAGER_H
 
-#ifdef __GNUG__
-#pragma interface "apt-pkg/packagemanager.h"
-#endif
 
 #include <string>
+#include <iostream>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/depcache.h>
 
@@ -51,6 +49,7 @@ class pkgPackageManager : protected pkgCache::Namespace
    bool Debug;
          
    bool DepAdd(pkgOrderList &Order,PkgIterator P,int Depth = 0);
+   void ImmediateAdd(PkgIterator P, bool UseInstallVer, unsigned const int &Depth = 0);
    virtual OrderResult OrderInstall();
    bool CheckRConflicts(PkgIterator Pkg,DepIterator Dep,const char *Ver);
    bool CreateOrderList();
@@ -82,12 +81,7 @@ class pkgPackageManager : protected pkgCache::Namespace
                    pkgRecords *Recs);
 
    // Do the installation 
-   OrderResult DoInstall() {
-      if(DoInstallPreFork() == Failed)
-        return Failed;
-
-      return DoInstallPostFork();
-   }
+   OrderResult DoInstall(int statusFd=-1);
 
    // stuff that needs to be done before the fork() of a library that
    // uses apt
@@ -97,18 +91,7 @@ class pkgPackageManager : protected pkgCache::Namespace
    };
 
    // stuff that needs to be done after the fork
-   OrderResult DoInstallPostFork(int statusFd=-1) {
-      bool goResult = Go(statusFd);
-      if(goResult == false) 
-        return Failed;
-      
-      // if all was fine update the state file
-      if(Res == Completed)
-        Cache.writeStateFile(NULL);
-
-      return Res;
-   };
-
+   OrderResult DoInstallPostFork(int statusFd=-1);
    bool FixMissing();
    
    pkgPackageManager(pkgDepCache *Cache);