summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-12-03 17:47:53 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2009-12-03 17:47:53 +0100
commit864cf8e52aa37de28f2fc9a66236713f1ba34409 (patch)
treeaf16fdbac7edd9a196e4a26bfb18e23555ed3b2e /apt-pkg/deb/dpkgpm.cc
parent2183a0862311cf2fbb82f61ecdcdf3816ce90040 (diff)
parent2ec8479cef7475fbc82ffdaf6a7bf658f5c3ac52 (diff)
merge from debian-sid apt 0.7.24
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r--apt-pkg/deb/dpkgpm.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 500d4a260..332b3cf0b 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -652,6 +652,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
// support subpressing of triggers processing for special
// cases like d-i that runs the triggers handling manually
bool const SmartConf = (_config->Find("PackageManager::Configure", "all") != "all");
+ bool const TriggersPending = _config->FindB("DPkg::TriggersPending", false);
if (_config->FindB("DPkg::ConfigurePending", SmartConf) == true)
List.push_back(Item(Item::ConfigurePending, PkgIterator()));
@@ -712,9 +713,23 @@ bool pkgDPkgPM::Go(int OutStatusFd)
// this loop is runs once per operation
for (vector<Item>::const_iterator I = List.begin(); I != List.end();)
{
+ // Do all actions with the same Op in one run
vector<Item>::const_iterator J = I;
- for (; J != List.end() && J->Op == I->Op; J++)
- /* nothing */;
+ if (TriggersPending == true)
+ for (; J != List.end(); J++)
+ {
+ if (J->Op == I->Op)
+ continue;
+ if (J->Op != Item::TriggersPending)
+ break;
+ vector<Item>::const_iterator T = J + 1;
+ if (T != List.end() && T->Op == I->Op)
+ continue;
+ break;
+ }
+ else
+ for (; J != List.end() && J->Op == I->Op; J++)
+ /* nothing */;
// Generate the argument list
const char *Args[MaxArgs + 50];