From 8e7a99564dd57b0dcb7df47b43e71ccefc8e0ebe Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 23 Nov 2016 23:09:05 +0100 Subject: skip unconfigure for unconfigured to-be removed pkgs --- apt-pkg/deb/dpkgpm.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 08cfccf93..2e779ca8b 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1184,6 +1184,18 @@ void pkgDPkgPM::BuildPackagesProgressMap() ++PackagesTotal; return true; }); + if ((I.Op == Item::Remove || I.Op == Item::Purge) && I.Pkg->CurrentVer != 0) + { + if (I.Pkg->CurrentState == pkgCache::State::UnPacked || + I.Pkg->CurrentState == pkgCache::State::HalfInstalled) + { + if (likely(strcmp(PackageOps[name][0].state, "half-configured") == 0)) + { + ++PackageOpsDone[name]; + --PackagesTotal; + } + } + } } /* one extra: We don't want the progress bar to reach 100%, especially not if we call dpkg --configure --pending and process a bunch of triggers -- cgit v1.2.3