]> git.saurik.com Git - apt.git/commitdiff
do not configure unconfigured to be removed packages
authorDavid Kalnischkies <david@kalnischkies.de>
Wed, 23 Nov 2016 21:17:01 +0000 (22:17 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Wed, 23 Nov 2016 23:21:35 +0000 (00:21 +0100)
We try to configure all packages at the end which need to be configured,
but that also applies to packages which weren't completely installed
(e.g. maintainerscript failed) we end up removing in this interaction
instead.

APT doesn't perform this explicit configure in the end as it is using
"dpkg --configure --pending", but it does confuse the progress report
and potentially also hook scripts.

Regression-Of: 9ffbac99e52c91182ed8ff8678a994626b194e69

apt-pkg/deb/dpkgpm.cc

index d76b59449dff268f3f9086fa731ca7f530d7c63d..08cfccf93c6e15b438d18e35482f168e0b3a47ea 100644 (file)
@@ -1424,7 +1424,8 @@ bool pkgDPkgPM::ExpandPendingCalls(std::vector<Item> &List, pkgDepCache &Cache)
         if (I.Op == Item::Install && alreadyConfigured.insert(I.Pkg->ID).second == true)
            AppendList.emplace_back(Item::Configure, I.Pkg);
       for (auto Pkg = Cache.PkgBegin(); Pkg.end() == false; ++Pkg)
         if (I.Op == Item::Install && alreadyConfigured.insert(I.Pkg->ID).second == true)
            AppendList.emplace_back(Item::Configure, I.Pkg);
       for (auto Pkg = Cache.PkgBegin(); Pkg.end() == false; ++Pkg)
-        if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure && alreadyConfigured.insert(Pkg->ID).second == true)
+        if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure &&
+              Cache[Pkg].Delete() == false && alreadyConfigured.insert(Pkg->ID).second == true)
            AppendList.emplace_back(Item::Configure, Pkg);
       std::move(AppendList.begin(), AppendList.end(), std::back_inserter(List));
    }
            AppendList.emplace_back(Item::Configure, Pkg);
       std::move(AppendList.begin(), AppendList.end(), std::back_inserter(List));
    }