summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-10-04 12:17:32 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-10-04 12:17:32 +0200
commit875f43482460b980f7951b7796caf541e21a648e (patch)
tree3ac4b3c1a914584c2c3423a8abfc0999c347128a /apt-pkg/depcache.cc
parenta9b7fb975821984f252baf100393c16d86f6db2a (diff)
cherry pick from lp:~donkult/apt/sid branch
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 018b05e65..ff9233ef2 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;
}
/*}}}*/