]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/dpkgpm.cc
react to trig-pend only if we have nothing else to do
[apt.git] / apt-pkg / deb / dpkgpm.cc
index 9d1739d68032988ab67247d43e8b9607ab02d0e8..7c41e02b4059f5f3b0d31ad1e4697ec6d0eb0fd7 100644 (file)
@@ -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;
+      }
    }
 }
                                                                        /*}}}*/