diff options
author | Filipe Brandenburger <filbranden@google.com> | 2018-03-07 14:15:33 -0800 |
---|---|---|
committer | Filipe Brandenburger <filbranden@google.com> | 2018-05-21 09:13:26 -0700 |
commit | f0c2263dd702d646722b749f7b7d278d15c18c55 (patch) | |
tree | 36ca682f51ee853c7d2fc2c72fef097fa1d6f6e7 /apt-pkg/depcache.h | |
parent | ea901a491bcfe406267c7c38c227c5caabf017a0 (diff) |
Increase debug verbosity in `apt-get autoremove`
When running with Debug::pkgAutoRemove=yes, explain why certain packages
are being marked, either because they're marked essential/important or
because they match the blacklist from APT::NeverAutoRemove.
This should help troubleshoot cases where autoremove is not proposing
removal of packages expected to be up for removal.
Tested manually with `apt-get autoremove -o Debug::pkgAutoRemove=yes`.
Diffstat (limited to 'apt-pkg/depcache.h')
-rw-r--r-- | apt-pkg/depcache.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 4536f3b52..724bf566e 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -88,11 +88,15 @@ class pkgDepCache : protected pkgCache::Namespace * * \param follow_suggests If \b true, suggestions of the package * will be recursively marked. + * + * \param reason The reason why the package is being marked. + * (Used in logging when Debug::pkgAutoRemove is set.) */ APT_HIDDEN void MarkPackage(const pkgCache::PkgIterator &pkg, const pkgCache::VerIterator &ver, bool const &follow_recommends, - bool const &follow_suggests); + bool const &follow_suggests, + const char *reason); /** \brief Update the Marked field of all packages. * |