summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-08-05 10:09:42 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2008-08-05 10:09:42 +0200
commitff38d63b19c0be1fb4be9a692fed2702d935d5e5 (patch)
tree22e52e1393ef0f01d0fd58c64342690c8247c01b /apt-pkg/deb
parentbb6dd359654f4debd9816cc27fd893a437eb66cd (diff)
* apt-pkg/deb/dpkgpm.cc:
- fix uninitialized variable that caused no apport reports to be written sometimes (thanks to Matt Zimmerman)
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/dpkgpm.cc8
1 files changed, 7 insertions, 1 deletions
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);