diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-11-26 11:19:11 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-11-26 11:19:11 +0100 |
commit | 3024a85e0ce1b732338cdb23c86a2111a9846c38 (patch) | |
tree | 15c3b579e968bc2ae81032ac52c2fc0e3b71a578 /apt-pkg/deb/dpkgpm.cc | |
parent | 73e0ee1e7f97571d7be3277e3c25c2f41b2bb946 (diff) |
* apt-pkg/deb/dpkgpm.cc:
- filter "ENOMEM" errors when creating apport reports
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index ae99e4324..a54c20330 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1027,6 +1027,12 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) return; } + // do not report out-of-memory failures + if(strstr(errormsg, strerror(ENOMEM)) != NULL) { + std::clog << _("No apport report written because the error message indicates a out of memory error") << std::endl; + return; + } + // get the pkgname and reportfile pkgname = flNotDir(pkgpath); pos = pkgname.find('_'); |