summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-06-28 08:41:51 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-06-28 08:41:51 +0000
commit120365cee294d00706928b0327ac755ab3448eca (patch)
treed42b8e3ce6b11331f23b2bf075e0130f9d827073 /apt-pkg/depcache.cc
parente004867d0979224adb9cbeb9705f156e16e3fe26 (diff)
* cleanups, documentation updates (don't show any debug output if no Debug::pkgAutomaticRemove was set, don't remove if not APT::Get::AutomaticRemove (--automatic-remove) was set)
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 54cfcb8bb..e30baa4b2 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -20,6 +20,8 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/tagfile.h>
+
+#include <iostream>
#include <sstream>
#include <apti18n.h>
/*}}}*/
@@ -162,7 +164,8 @@ bool pkgDepCache::writeStateFile(OpProgress *prog)
// check if we have new information
if(PkgState[pkg->ID].Flags & pkgCache::Flag::Auto) {
- std::cout << "pkg: " << pkg.Name() << " is auto-dep" << std::endl;
+ if(_config->FindI("Debug::pkgAutoRemove",false))
+ std::clog << "pkg: " << pkg.Name() << " is auto-dep" << std::endl;
PkgState[pkg->ID].AutomaticRemove = pkgCache::State::RemoveRequired;
}
@@ -172,7 +175,6 @@ bool pkgDepCache::writeStateFile(OpProgress *prog)
<< "\nRemove-Reason: "
<< (int)(PkgState[pkg->ID].AutomaticRemove) << "\n\n";
StateFile.Write(ostr.str().c_str(), ostr.str().size());
- //std::cout << "Writing auto-mark: " << ostr.str() << endl;
}
}
return true;