diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-10-02 09:19:31 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-10-02 09:19:31 +0200 |
commit | 0c6aa02ecfbb1b1ecac519527467befae36b7c40 (patch) | |
tree | 42ea9f6771d1caa751d4f8646a78c85946a83934 /apt-pkg/depcache.cc | |
parent | 6774b53da5215ae1c3ebe6a3fff496d61cd779f7 (diff) |
* apt-pkg/depcache.cc:
- do not remove packages which the user requested for installation
explicitly while satisfying other install requests (Closes: #598669)
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r-- | apt-pkg/depcache.cc | 10 |
1 files changed, 10 insertions, 0 deletions
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; } /*}}}*/ |