]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/algorithms.cc
* merged with apt--debian-sid
[apt.git] / apt-pkg / algorithms.cc
index ac9d3be0bea35a05c93d4545c1996c8c7a91f349..55f44fbd5c6bba50dc5813f4b7a41488b65b128b 100644 (file)
@@ -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);
+        }
       }
    }   
 }