]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/packagemanager.cc
* apt-pkg/depcache.cc:
[apt.git] / apt-pkg / packagemanager.cc
index 71a0dd034cc649bbdf8ecf2b745a948c43bcf236..1e57d645561db47fd6afef95a2cb5757e4135c9e 100644 (file)
@@ -95,9 +95,10 @@ bool pkgPackageManager::GetArchives(pkgAcquire *Owner,pkgSourceList *Sources,
    be downloaded. */
 bool pkgPackageManager::FixMissing()
 {   
+   pkgDepCache::ActionGroup group(Cache);
    pkgProblemResolver Resolve(&Cache);
    List->SetFileList(FileNames);
-   
+
    bool Bad = false;
    for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
    {
@@ -106,7 +107,7 @@ bool pkgPackageManager::FixMissing()
    
       // Okay, this file is missing and we need it. Mark it for keep 
       Bad = true;
-      Cache.MarkKeep(I);
+      Cache.MarkKeep(I, false, false);
    }
  
    // We have to empty the list otherwise it will not have the new changes
@@ -593,7 +594,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
          Pkg.State() == pkgCache::PkgIterator::NeedsNothing &&
          (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)
       {
-        _error->Error("Internal Error, trying to manipulate a kept package");
+        _error->Error("Internal Error, trying to manipulate a kept package (%s)",Pkg.Name());
         return Failed;
       }
       
@@ -627,3 +628,15 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
    return Completed;
 }
                                                                        /*}}}*/
+// PM::DoInstall - Does the installation                               /*{{{*/
+// ---------------------------------------------------------------------
+/* This uses the filenames in FileNames and the information in the
+   DepCache to perform the installation of packages.*/
+pkgPackageManager::OrderResult pkgPackageManager::DoInstall(int statusFd)
+{
+   if(DoInstallPreFork() == Failed)
+      return Failed;
+   
+   return DoInstallPostFork(statusFd);
+}
+                                                                       /*}}}*/