]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/algorithms.cc
* merged apt--tasks, this brings in the latest changes from apt--mvo as well
[apt.git] / apt-pkg / algorithms.cc
index f50c52a3297842910d60b45a661b3b00adf54583..ddfda754daaf6809ce48d328961c859564ccc9fc 100644 (file)
@@ -1250,8 +1250,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);
+        }
       }
    }   
 }