summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2009-07-07 20:14:04 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2009-07-07 20:14:04 +0200
commitc3a85f49fd8c82326707ce870c2b11b587fd0bd1 (patch)
treeb3ac8443303c26dd0395e591d68097500b76314f /apt-pkg/depcache.cc
parentecf59bfcf3ca573aa15a44086a7852d1308ff1ad (diff)
* remove the MarkKeep calls if Is{Delete,Install}Ok false, because
they have no effect anyway (thanks Daniel Burrows for noticing) * improve documentation of the Is{Delete,Install}Ok methods a bit * add the FromUser boolean to the debug output of the markers
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 7c86204f5..e17b7b0e8 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -747,7 +747,7 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser,
#endif
if (DebugMarker == true)
- std::clog << OutputInDepth(Depth) << "MarkKeep " << Pkg << std::endl;
+ std::clog << OutputInDepth(Depth) << "MarkKeep " << Pkg << " FU=" << FromUser << std::endl;
RemoveSizes(Pkg);
RemoveStates(Pkg);
@@ -793,13 +793,10 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge,
// check if we are allowed to install the package
if (IsDeleteOk(Pkg,rPurge,Depth,FromUser) == false)
- {
- MarkKeep(Pkg,false,FromUser,Depth+1);
return;
- }
if (DebugMarker == true)
- std::clog << OutputInDepth(Depth) << "MarkDelete " << Pkg << std::endl;
+ std::clog << OutputInDepth(Depth) << "MarkDelete " << Pkg << " FU=" << FromUser << std::endl;
RemoveSizes(Pkg);
RemoveStates(Pkg);
@@ -826,7 +823,7 @@ bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge,
if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold)
{
if (DebugMarker == true)
- std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << std::endl;
+ std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl;
return false;
}
return true;
@@ -870,10 +867,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
// check if we are allowed to install the package
if (IsInstallOk(Pkg,AutoInst,Depth,FromUser) == false)
- {
- MarkKeep(Pkg,false,FromUser,Depth+1);
return;
- }
/* Target the candidate version and remove the autoflag. We reset the
autoflag below if this was called recursively. Otherwise the user
@@ -908,7 +902,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
return;
if (DebugMarker == true)
- std::clog << OutputInDepth(Depth) << "MarkInstall " << Pkg << std::endl;
+ std::clog << OutputInDepth(Depth) << "MarkInstall " << Pkg << " FU=" << FromUser << std::endl;
DepIterator Dep = P.InstVerIter(*this).DependsList();
for (; Dep.end() != true;)
@@ -1091,7 +1085,7 @@ bool pkgDepCache::IsInstallOk(PkgIterator const &Pkg,bool AutoInst,
if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold)
{
if (DebugMarker == true)
- std::clog << OutputInDepth(Depth) << "Hold prevents MarkInstall of " << Pkg << std::endl;
+ std::clog << OutputInDepth(Depth) << "Hold prevents MarkInstall of " << Pkg << " FU=" << FromUser << std::endl;
return false;
}
return true;