summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2021-04-29 08:28:08 +0000
committerJulian Andres Klode <jak@debian.org>2021-04-29 08:28:08 +0000
commita6cb741a2cd1fa132705f8f5644872fc9708fb68 (patch)
tree9fa69d08cffef40cbf69e783ff3be4e52ff6f759 /cmdline
parent5d81ec308275b625a20b889fa3daa43815ddc80d (diff)
parentf90b892e6acc0ca725811ef0dd9be3fed66c444f (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.cc9
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 /*{{{*/