X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/33e46bc7032c2bcab654ab3f6a0a10ad82264ead..86e2dc4dd728924d71995ebaeb83a4d9abba94d5:/apt-pkg/depcache.cc diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 7c09d3a38..4c12a4fe1 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -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)