summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 98bd8dd8b..dd16b5dc8 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -1330,11 +1330,12 @@ void pkgMarkPkgUsed(pkgDepCache &Cache, pkgCache::PkgIterator Pkg,
bool pkgMarkUsed(pkgDepCache &Cache)
{
// debug only
- for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); ! Pkg.end(); ++Pkg)
- if(!Cache[Pkg].Dirty() && Cache[Pkg].AutomaticRemove > 0)
- std::cout << "has auto-remove information: " << Pkg.Name()
- << " " << (int)Cache[Pkg].AutomaticRemove
- << std::endl;
+ if(_config->FindI("Debug::pkgAutoRemove",false) == true)
+ for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); ! Pkg.end(); ++Pkg)
+ if(!Cache[Pkg].Dirty() && Cache[Pkg].AutomaticRemove > 0)
+ std::cout << "has auto-remove information: " << Pkg.Name()
+ << " " << (int)Cache[Pkg].AutomaticRemove
+ << std::endl;
// init with defaults
for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); ! Pkg.end(); ++Pkg)