summaryrefslogtreecommitdiff
path: root/apt-private/private-install.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-04-28 09:22:55 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-31 13:49:37 +0200
commit90daf43aeb6a911f6511faf5064f5811fd27acb5 (patch)
tree0cba503cc9005ae417c5d932e1632fdca9732e1b /apt-private/private-install.cc
parent18048c51c1d8cff71f134dd405421baba292944b (diff)
factor out Pkg/DepIterator prettyprinters into own header
The old prettyprinters have only access to the struct they pretty print, which isn't enough usually as we want to know for a package also a bit of state information like which version is the candidate. We therefore need to pull the DepCache into context and hence use a temporary struct which is printed instead of the iterator itself. (cherry picked from commit 84573326f41dd09b914b8374548e7ee7c93d0439)
Diffstat (limited to 'apt-private/private-install.cc')
-rw-r--r--apt-private/private-install.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index 3f57b55e2..a4917c5af 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -21,6 +21,7 @@
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/upgrade.h>
#include <apt-pkg/install-progress.h>
+#include <apt-pkg/prettyprinters.h>
#include <stdlib.h>
#include <string.h>
@@ -443,8 +444,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
// install it in the first place, so nuke it instead of show it
if (Cache[Pkg].Install() == true && Pkg.CurrentVer() == 0)
{
- if (Pkg.CandVersion() != 0)
- tooMuch.insert(Pkg);
+ tooMuch.insert(Pkg);
Cache->MarkDelete(Pkg, false, 0, false);
}
// only show stuff in the list that is not yet marked for removal
@@ -481,7 +481,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
if (N.end() == true || (N->CurrentVer == 0 && (*Cache)[N].Install() == false))
continue;
if (Debug == true)
- std::clog << "Save " << Pkg << " as another installed garbage package depends on it" << std::endl;
+ std::clog << "Save " << APT::PrettyPkg(Cache, Pkg) << " as another installed garbage package depends on it" << std::endl;
Cache->MarkInstall(Pkg, false, 0, false);
if (hideAutoRemove == false)
++autoRemoveCount;