]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
merged from debian-sid
[apt.git] / apt-pkg / depcache.cc
index ddbd3769905bd69931b1e177a2f62a8e2617c1df..cb1264b04ae0e6f86dacbb3161aa0a657965e7d6 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)