]> git.saurik.com Git - apt.git/commitdiff
skip unconfigure for unconfigured to-be removed pkgs
authorDavid Kalnischkies <david@kalnischkies.de>
Wed, 23 Nov 2016 22:09:05 +0000 (23:09 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Wed, 23 Nov 2016 23:21:35 +0000 (00:21 +0100)
apt-pkg/deb/dpkgpm.cc

index 08cfccf93c6e15b438d18e35482f168e0b3a47ea..2e779ca8ba4d4338de6f2360ae59205afa77b6ac 100644 (file)
@@ -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