diff options
author | David Kalnischkies <david@kalnischkies.de> | 2021-03-06 14:12:01 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2021-04-25 16:25:57 +0200 |
commit | f90b892e6acc0ca725811ef0dd9be3fed66c444f (patch) | |
tree | c018dde822d51d8d624216eecf0c08d122be7850 /apt-pkg | |
parent | 408f4e0d32d11d3f7b7ec0e27fe8cf73cad23a6c (diff) |
Count uninstallable packages in "not upgraded"
If a first step of the solver can figure out that a package is
uninstallable it might reset the candidate so that later steps are
prevented from exploring this dead end. While that helps the resolver it
can confuse the display of the found solution as this will include an
incorrect count of packages not upgraded in this solution.
It was possible before, but happens a fair bit more with the April/May
resolver changes last year so finally doing proper counting is a good
idea.
Sadly this is a bit harder than just getting the number first and than
subtracting the packages we upgraded from it as the user can influence
candidates via the command line and a package which could be upgraded,
but is removed instead shouldn't count as not upgraded as we clearly did
something with it. So we keep a list of packages instead of a number
which also help in the upgrade cmds as those want to show the list.
Closes: #981535
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/cacheset.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index 565a2b298..df750cb44 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -295,7 +295,8 @@ bool CacheSetHelper::PackageFromPackageName(PackageContainerInterface * const pc pci->insert(Pkg); return true; } - + /*}}}*/ +// PackageFromPattern - Return all packages matching a specific pattern /*{{{*/ bool CacheSetHelper::PackageFromPattern(PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string const &pattern) { if (pattern.size() < 1 || (pattern[0] != '?' && pattern[0] != '~')) |