]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
releasing version 0.8.3ubuntu7
[apt.git] / apt-pkg / depcache.cc
index ff9233ef263adb1af742121758f5e75814a70aa1..d3e45f76b9489c34176e6614df78e1cdd1555c22 100644 (file)
@@ -1192,9 +1192,13 @@ bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge,
         std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl;
       return false;
    }
         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];
    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)
       if (P.InstallVer != 0 && P.Status == 2 && (P.Flags & Flag::Auto) != Flag::Auto)
       {
         if (DebugMarker == true)