]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/algorithms.cc
* merged from the apt--auto-mark branch
[apt.git] / apt-pkg / algorithms.cc
index ac9d3be0bea35a05c93d4545c1996c8c7a91f349..8a22819bf168e40f49de876433e029ff8fddfe8b 100644 (file)
@@ -800,7 +800,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix)
            continue;
         
         if (Debug == true)
-           cout << "Investigating " << I.Name() << endl;
+           clog << "Investigating " << I.Name() << endl;
         
         // Isolate the problem dependency
         PackageKill KillList[100];
@@ -1229,8 +1229,13 @@ void pkgProblemResolver::InstallProtect()
       {
         if ((Flags[I->ID] & ToRemove) == ToRemove)
            Cache.MarkDelete(I);
-        else
-           Cache.MarkInstall(I, false, 0, false);
+        else 
+        {
+           // preserver the information if the package was auto
+           // or manual installed
+           bool autoInst = (Cache[I].Flags & pkgCache::Flag::Auto);
+           Cache.MarkInstall(I, false, 0, !autoInst);
+        }
       }
    }   
 }