diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-08-11 18:21:37 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-08-11 18:21:37 +0200 |
commit | d6a4afcb1b937e07aaf186346f064833f65acfbd (patch) | |
tree | 4173a605ed33526f2f51007f3dc85783dffd5553 /apt-pkg/deb/dpkgpm.cc | |
parent | 80fbbbd91708a8f0da24161d0a8ababc9f968425 (diff) |
* apt-pkg/deb/dpkgpm.cc:
- improve the filtering for duplicated apport reports (thanks
to seb128 for pointing that problem out)
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index e1b3c6bc0..08291854f 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -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('_'); |