summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-10-05 14:26:00 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-10-05 14:26:00 +0200
commitcd34cff9ba86412cde34ec94f28b21d4e15b1447 (patch)
tree8c5f3ba98ccbc0eee76a31f24200aeae83b8b4d8 /apt-pkg/depcache.cc
parent875f43482460b980f7951b7796caf541e21a648e (diff)
releasing version 0.8.3ubuntu7
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index ff9233ef2..d3e45f76b 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -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;
}
+ // 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)