summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-07-21 16:33:01 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-08-10 23:18:04 +0200
commit0dd19915f44df0048d594d527797c62ab6195cc6 (patch)
treebc82146f26e473245c05b9f7cf5ea07dd2824a1c /apt-pkg/deb
parente7d4e0cf4f6d79810e4b4e7de505729e759213dd (diff)
call dpkg with --no-triggers by default
Implemented a long while ago now with relatively good progress reporting involving triggers is a good time to try delaying the execution of triggers across dpkg invocations finally by default. Note: The bugreport talks also about 'smarter' configuration which is a much bigger part and approached from multiple directions, but doesn't really involve triggers per-se so considering it decoupled should help in getting it doneā€¦ Closes: #626599
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/dpkgpm.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index bc34e50e0..e4f9550b0 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1303,7 +1303,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
OSArgMax = 32*1024;
OSArgMax -= EnvironmentSize() - 2*1024;
unsigned int const MaxArgBytes = _config->FindI("Dpkg::MaxArgBytes", OSArgMax);
- bool const NoTriggers = _config->FindB("DPkg::NoTriggers", false);
+ bool const NoTriggers = _config->FindB("DPkg::NoTriggers", true);
if (RunScripts("DPkg::Pre-Invoke") == false)
return false;
@@ -1474,6 +1474,12 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
ADDARG(status_fd_buf);
unsigned long const Op = I->Op;
+ if (NoTriggers == true && I->Op != Item::TriggersPending &&
+ I->Op != Item::ConfigurePending)
+ {
+ ADDARGC("--no-triggers");
+ }
+
switch (I->Op)
{
case Item::Remove:
@@ -1520,11 +1526,6 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
break;
}
- if (NoTriggers == true && I->Op != Item::TriggersPending &&
- I->Op != Item::ConfigurePending)
- {
- ADDARGC("--no-triggers");
- }
char * tmpdir_to_free = nullptr;
// Write in the file or package names