]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/deb/dpkgpm.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 11 Aug 2008 16:21:37 +0000 (18:21 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 11 Aug 2008 16:21:37 +0000 (18:21 +0200)
  - improve the filtering for duplicated apport reports (thanks
    to seb128 for pointing that problem out)

apt-pkg/deb/dpkgpm.cc
debian/changelog

index e1b3c6bc0076e4ef95049eea5099fd8fffd6603b..08291854fe57b22ea1a6ba599c04a91d02faf4bd 100644 (file)
@@ -387,6 +387,14 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line)
 
    if(strncmp(action,"error",strlen("error")) == 0)
    {
+      // urgs, sometime has ":" in its error string so that we
+      // end up with the error message split between list[3]
+      // and list[4], e.g. the message: 
+      // failed in buffer_write(fd) (10, ret=-1): backend dpkg-deb ...
+      // concat them again
+      if( list[4] != NULL)
+        list[4][-1] = ':';
+
       status << "pmerror:" << list[1]
             << ":"  << (PackagesDone/float(PackagesTotal)*100.0) 
             << ":" << list[3]
@@ -954,13 +962,20 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
       return;
    }
 
-   // only report the first error
+   // only report the first errors
    if(pkgFailures > _config->FindI("APT::Apport::MaxReports", 3))
    {
       std::clog << _("No apport report written because MaxReports is reached already") << std::endl;
       return;
    }
 
+   // check if its not a follow up error 
+   const char *needle = dgettext("dpkg", "dependency problems - leaving unconfigured");
+   if(strstr(errormsg, needle) != NULL) {
+      std::clog << _("No apport report written because the error message indicates its a followup error from a previous failure.") << std::endl;
+      return;
+   }
+
    // get the pkgname and reportfile
    pkgname = flNotDir(pkgpath);
    pos = pkgname.find('_');
index 5df4cc26b615badae8f1e94cca3c3e494342ddd7..e7a3ea9ad69ccaf379b6b6fd682ce4cfec73ef8f 100644 (file)
@@ -8,6 +8,9 @@ apt (0.7.14ubuntu6) UNRELEASED; urgency=low
     - support having CDs with no Packages file (just a Packages.gz)
       by not forcing a verification on non-existing files
      (LP: #255545)
+  * apt-pkg/deb/dpkgpm.cc:
+    - improve the filtering for duplicated apport reports (thanks
+      to seb128 for pointing that problem out)
 
  -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 07 Aug 2008 16:28:05 +0200