From ff38d63b19c0be1fb4be9a692fed2702d935d5e5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 5 Aug 2008 10:09:42 +0200 Subject: * apt-pkg/deb/dpkgpm.cc: - fix uninitialized variable that caused no apport reports to be written sometimes (thanks to Matt Zimmerman) --- apt-pkg/deb/dpkgpm.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 74f672dd9..ede1673bc 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -47,7 +47,7 @@ using namespace std; /* */ pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache) : pkgPackageManager(Cache), dpkgbuf_pos(0), - term_out(NULL), PackagesDone(0), PackagesTotal(0) + term_out(NULL), PackagesDone(0), PackagesTotal(0), pkgFailures(0) { } /*}}}*/ @@ -946,11 +946,17 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) FILE *report; if (_config->FindB("Dpkg::ApportFailureReport",true) == false) + { + std::clog << "configured to not write apport reports" << std::endl; return; + } // only report the first error if(pkgFailures > _config->FindI("APT::Apport::MaxReports", 3)) + { + std::clog << _("No apport report written because MaxReports is reached already") << std::endl; return; + } // get the pkgname and reportfile pkgname = flNotDir(pkgpath); -- cgit v1.2.3