]> git.saurik.com Git - apt.git/commitdiff
do not report disk full errors from dpkg via apport
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 11 Aug 2008 17:44:23 +0000 (19:44 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 11 Aug 2008 17:44:23 +0000 (19:44 +0200)
apt-pkg/deb/dpkgpm.cc
debian/changelog

index 8c353a9d9384b9b0164659dadeb490e5e8e3e2ba..2e9dedefa481613df033677856f923ec1139823c 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/wait.h>
 #include <signal.h>
 #include <errno.h>
+#include <string.h>
 #include <stdio.h>
 #include <sstream>
 #include <map>
@@ -976,6 +977,12 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
       return;
    }
 
+   // do not report disk-full failures 
+   if(strstr(errormsg, strerror(ENOSPC)) != NULL) {
+      std::clog << _("No apport report written because the error message indicates a disk full error") << std::endl;
+      return;
+   }
+
    // get the pkgname and reportfile
    pkgname = flNotDir(pkgpath);
    pos = pkgname.find('_');
index e7a3ea9ad69ccaf379b6b6fd682ce4cfec73ef8f..7c5ef5b0e35b5879baa442d88ad9f79d08a40b36 100644 (file)
@@ -11,6 +11,7 @@ apt (0.7.14ubuntu6) UNRELEASED; urgency=low
   * apt-pkg/deb/dpkgpm.cc:
     - improve the filtering for duplicated apport reports (thanks
       to seb128 for pointing that problem out)
+    - do not report disk full errors from dpkg via apport
 
  -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 07 Aug 2008 16:28:05 +0200