diff options
author | Julian Andres Klode <jak@debian.org> | 2021-04-29 08:28:08 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2021-04-29 08:28:08 +0000 |
commit | a6cb741a2cd1fa132705f8f5644872fc9708fb68 (patch) | |
tree | 9fa69d08cffef40cbf69e783ff3be4e52ff6f759 /cmdline | |
parent | 5d81ec308275b625a20b889fa3daa43815ddc80d (diff) | |
parent | f90b892e6acc0ca725811ef0dd9be3fed66c444f (diff) |
Merge branch 'pu/upgradecounter' into 'main'
Count uninstallable packages in "not upgraded"
See merge request apt-team/apt!169
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index efb5cfd73..010021991 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -206,8 +206,13 @@ static bool DoDSelectUpgrade(CommandLine &) ShowBroken(c1out,Cache,false); return _error->Error(_("Internal error, problem resolver broke stuff")); } - - return InstallPackages(Cache,false); + + APT::PackageVector HeldBackPackages; + for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); not Pkg.end(); ++Pkg) + if (Pkg->CurrentVer != 0 && Cache[Pkg].Upgradable() && not Cache[Pkg].Upgrade() && not Cache[Pkg].Delete()) + HeldBackPackages.push_back(Pkg); + + return InstallPackages(Cache, HeldBackPackages, false); } /*}}}*/ // DoCheck - Perform the check operation /*{{{*/ |