summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-08-11 19:44:23 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2008-08-11 19:44:23 +0200
commit2f0d5deabcd1d75400d302bdbb330184d4fe97ba (patch)
treef3b4158513af5dd2c72bf887be34c2ab8b8283bb
parent5279f566ec5bba9f5003440ecc575dc4d32b756b (diff)
do not report disk full errors from dpkg via apport
-rw-r--r--apt-pkg/deb/dpkgpm.cc7
-rw-r--r--debian/changelog1
2 files changed, 8 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 8c353a9d9..2e9dedefa 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -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('_');
diff --git a/debian/changelog b/debian/changelog
index e7a3ea9ad..7c5ef5b0e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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