From 0c6aa02ecfbb1b1ecac519527467befae36b7c40 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 2 Oct 2010 09:19:31 +0200 Subject: * apt-pkg/depcache.cc: - do not remove packages which the user requested for installation explicitly while satisfying other install requests (Closes: #598669) --- apt-pkg/depcache.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index d893c42d7..0b5d6d8e6 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1192,6 +1192,16 @@ bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge, std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl; return false; } + else if (FromUser == false && Pkg->CurrentVer == 0) + { + StateCache &P = PkgState[Pkg->ID]; + if (P.InstallVer != 0 && P.Status == 2 && (P.Flags & Flag::Auto) != Flag::Auto) + { + if (DebugMarker == true) + std::clog << OutputInDepth(Depth) << "Manual install request prevents MarkDelete of " << Pkg << std::endl; + return false; + } + } return true; } /*}}}*/ -- cgit v1.2.3