diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-11-23 23:09:05 +0100 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-02-22 16:53:45 +0100 |
commit | 4ea646933c5f829d698705dc3100cbc51210ac35 (patch) | |
tree | 07bddcc398778fe2aeb3f7448c678877049c1bf6 | |
parent | 1037b2c18d5ec1b1f4e7f329d995799727ff2b70 (diff) | |
download | apt-4ea646933c5f829d698705dc3100cbc51210ac35.tar.gz |
skip unconfigure for unconfigured to-be removed pkgs
(cherry picked from commit 8e7a99564dd57b0dcb7df47b43e71ccefc8e0ebe)
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 12 |
1 files changed, 12 insertions, 0 deletions
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 |