summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/depcache.cc45
-rw-r--r--debian/changelog2
2 files changed, 45 insertions, 2 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index ee9f0da05..d1bea4cf6 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1305,7 +1305,7 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc)
{
// the package is installed (and set to keep)
if(PkgState[p->ID].Keep() && !p.CurrentVer().end())
- MarkPackage(p, p.CurrentVer(),
+ MarkPackage(p, p.CurrentVer(),
follow_recommends, follow_suggests);
// the package is to be installed
else if(PkgState[p->ID].Install())
@@ -1356,7 +1356,18 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
if(state.Marked)
return;
- //std::cout << "Setting Marked for: " << pkg.Name() << std::endl;
+ if(_config->FindB("Debug::pkgAutoRemove",false))
+ {
+ std::clog << "Marking: " << pkg.Name();
+ if(!ver.end())
+ std::clog << " " << ver.VerStr();
+ if(!currver.end())
+ std::clog << ", Curr=" << currver.VerStr();
+ if(!instver.end())
+ std::clog << ", Inst=" << instver.VerStr();
+ std::clog << std::endl;
+ }
+
state.Marked=true;
if(!ver.end())
@@ -1376,6 +1387,19 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
{
if(_system->VS->CheckDep(V.VerStr(), d->CompareOp, d.TargetVer()))
{
+ if(_config->FindB("Debug::pkgAutoRemove",false))
+ {
+ std::clog << "Following dep: " << d.ParentPkg().Name()
+ << " " << d.ParentVer().VerStr() << " "
+ << d.DepType() << " "
+ << d.TargetPkg().Name();
+ if((d->CompareOp & ~pkgCache::Dep::Or) != pkgCache::Dep::NoOp)
+ {
+ std::clog << " (" << d.CompType() << " "
+ << d.TargetVer() << ")";
+ }
+ std::clog << std::endl;
+ }
MarkPackage(V.ParentPkg(), V,
follow_recommends, follow_suggests);
}
@@ -1387,6 +1411,23 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
if(_system->VS->CheckDep(prv.ProvideVersion(), d->CompareOp,
d.TargetVer()))
{
+ if(_config->FindB("Debug::pkgAutoRemove",false))
+ {
+ std::clog << "Following dep: " << d.ParentPkg().Name()
+ << " " << d.ParentVer().VerStr() << " "
+ << d.DepType() << " "
+ << d.TargetPkg().Name();
+ if((d->CompareOp & ~pkgCache::Dep::Or) != pkgCache::Dep::NoOp)
+ {
+ std::clog << " (" << d.CompType() << " "
+ << d.TargetVer() << ")";
+ }
+ std::clog << ", provided by "
+ << prv.OwnerPkg().Name() << " "
+ << prv.OwnerVer().VerStr()
+ << std::endl;
+ }
+
MarkPackage(prv.OwnerPkg(), prv.OwnerVer(),
follow_recommends, follow_suggests);
}
diff --git a/debian/changelog b/debian/changelog
index 5fc67f6be..e8054bda4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -52,6 +52,8 @@ apt (0.7.12) unstable; urgency=low
- Patch MarkInstall to follow currently satisfied Recommends even
if they aren't "new", so that we automatically force upgrades
when the version of a Recommends has been tightened. (Closes: #470115)
+ - Enable more complete debugging information when Debug::pkgAutoRemove
+ is set.
* apt-pkg/contrib/configuration.cc
- Lift the 1024-byte limit on lines in configuration files.
(Closes: #473710, #473874)