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 +++++++- debian/changelog | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) 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); diff --git a/debian/changelog b/debian/changelog index e21260ffb..fb5fc9f77 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.7.14ubuntu4) intrepid; urgency=low + + * apt-pkg/deb/dpkgpm.cc: + - fix uninitialized variable that caused no apport reports + to be written sometimes (thanks to Matt Zimmerman) + + -- + apt (0.7.14ubuntu3) intrepid; urgency=low [ Otavio Salvador ] -- cgit v1.2.3