diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-11-23 23:09:05 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-11-24 00:21:35 +0100 |
commit | 8e7a99564dd57b0dcb7df47b43e71ccefc8e0ebe (patch) | |
tree | 681ade8e5ced4817bb2b7ceb9a0d0be394cb2c85 /apt-pkg | |
parent | bb9c5972524ac5c078fa0f0bc5674c7a0fe01fb4 (diff) |
skip unconfigure for unconfigured to-be removed pkgs
Diffstat (limited to 'apt-pkg')
-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 |