]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
merged from the debian-sid branch
[apt.git] / apt-pkg / depcache.cc
index 7c09d3a38fe4b6965feac4fa194aa43fa5e998cb..4c12a4fe1f878769f03e999a97077e6729f0a2fb 100644 (file)
@@ -1193,9 +1193,13 @@ bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge,
         std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl;
       return false;
    }
+   // if the removal is not explictely requested by the user, protect
+   // explicit new-install package from accidental removal by the 
+   // problemresolver
    else if (FromUser == false && Pkg->CurrentVer == 0)
    {
       StateCache &P = PkgState[Pkg->ID];
+      // Status == 2 means this applies for new installs only
       if (P.InstallVer != 0 && P.Status == 2 && (P.Flags & Flag::Auto) != Flag::Auto)
       {
         if (DebugMarker == true)