]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/deb/dpkgpm.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 21 Apr 2011 13:30:46 +0000 (15:30 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 21 Apr 2011 13:30:46 +0000 (15:30 +0200)
  - stop reporting of apport-package bug reports regarding
    dpkg I/O errors (LP: #767776)

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

index e957ce5fd14f32f90d9af9ca6044d0bdf5f41917..30f3b7d0f6dee5f5678bfcfd59404973f7dcbcff 100644 (file)
@@ -1324,18 +1324,24 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
 
    // do not report dpkg I/O errors, this is a format string, so we compare
    // the prefix and the suffix of the error with the dpkg error message
 
    // do not report dpkg I/O errors, this is a format string, so we compare
    // the prefix and the suffix of the error with the dpkg error message
-   const char *short_read_error = dgettext("dpkg", "short read in buffer_copy %s");
-   vector<string> list = VectorizeString(short_read_error, '%');
-   if (list.size() > 1) 
+   vector<string> io_errors;
+   io_errors.push_back(string("failed to read on buffer copy for %s"));
+   io_errors.push_back(string("failed in write on buffer copy for %s"));
+   io_errors.push_back(string("short read on buffer copy for %s"));
+
+   for (vector<string>::iterator I = io_errors.begin(); I != io_errors.end(); I++)
    {
    {
-      // we need to split %s, VectorizeString only allows char so we need
-      // to kill the "s" manually
-      if (list[1].size() > 1) {
-         list[1].erase(0, 1);
-         if(strstr(errormsg, list[0].c_str()) && 
-            strstr(errormsg, list[1].c_str())) {
-            std::clog << _("No apport report written because the error message indicates a dpkg I/O error") << std::endl;
-            return;
+      vector<string> list = VectorizeString(dgettext("dpkg", (*I).c_str()), '%');
+      if (list.size() > 1) {
+         // we need to split %s, VectorizeString only allows char so we need
+         // to kill the "s" manually
+         if (list[1].size() > 1) {
+            list[1].erase(0, 1);
+            if(strstr(errormsg, list[0].c_str()) && 
+               strstr(errormsg, list[1].c_str())) {
+               std::clog << _("No apport report written because the error message indicates a dpkg I/O error") << std::endl;
+               return;
+            }
          }
       }
    }
          }
       }
    }
index 4a986f0a25049c6587f19524e39b82b3be4c17fa..7d50f4f37ef60f7a76917c243b9979c8aa7c4595 100644 (file)
@@ -1,3 +1,11 @@
+apt (0.8.13.2ubuntu3) natty-proposed; urgency=low
+
+  * apt-pkg/deb/dpkgpm.cc:
+    - stop reporting of apport-package bug reports regarding
+      dpkg I/O errors (LP: #767776)
+
+ -- Brian Murray <brian@ubuntu.com>  Wed, 20 Apr 2011 15:05:12 -0700
+
 apt (0.8.13.2ubuntu2) natty; urgency=low
 
   [ Michael Vogt ]
 apt (0.8.13.2ubuntu2) natty; urgency=low
 
   [ Michael Vogt ]