diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-11-18 12:04:08 +0100 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-02-22 16:53:45 +0100 |
commit | c894ddf39ec51d45f40c36f3f47b4f7d31af8c65 (patch) | |
tree | b4d37efae47c7b4c93a2faa5568c5c552d0bc4e9 /apt-pkg | |
parent | 4ff096a524a4ad276aa785d3886875cf68b8c3fe (diff) |
react to trig-pend only if we have nothing else to do
If a package is triggered dpkg frequently issues two messages about it
causing us to make a note about it both times which messes up our
planned dpkg actions view. Adding these actions if we have nothing else
planned fixes this and should still be correct as those planned actions
will deal with the triggering just fine and we avoid strange problems
like a package triggered before its removed…
(cherry picked from commit 066d4a5bab628ef8220971bb5763ff8f3a13de07)
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 9d1739d68..7c41e02b4 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -715,18 +715,7 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line) if (prefix == "status") { std::vector<struct DpkgState> &states = PackageOps[pkgname]; - if (action == "triggers-pending") - { - if (Debug == true) - std::clog << "(parsed from dpkg) pkg: " << pkgname - << " action: " << action << " (prefix 2 to " - << PackageOpsDone[pkgname] << " of " << states.size() << ")" << endl; - - states.insert(states.begin(), {"installed", N_("Installed %s")}); - states.insert(states.begin(), {"half-configured", N_("Configuring %s")}); - PackagesTotal += 2; - } - else if(PackageOpsDone[pkgname] < states.size()) + if(PackageOpsDone[pkgname] < states.size()) { char const * next_action = states[PackageOpsDone[pkgname]].state; if (next_action) @@ -793,6 +782,17 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line) } } } + else if (action == "triggers-pending") + { + if (Debug == true) + std::clog << "(parsed from dpkg) pkg: " << pkgname + << " action: " << action << " (prefix 2 to " + << PackageOpsDone[pkgname] << " of " << states.size() << ")" << endl; + + states.insert(states.begin(), {"installed", N_("Installed %s")}); + states.insert(states.begin(), {"half-configured", N_("Configuring %s")}); + PackagesTotal += 2; + } } } /*}}}*/ |