Ver código fonte

* apt-pkg/deb/dpkgpm.cc:
- add APT::Apport::MaxReports to limit the maximum number
of reports generated in a single run (default to 3)

Michael Vogt 18 anos atrás
pai
commit
5273f1bf4d
2 arquivos alterados com 10 adições e 3 exclusões
  1. 2 3
      apt-pkg/deb/dpkgpm.cc
  2. 8 0
      debian/changelog

+ 2 - 3
apt-pkg/deb/dpkgpm.cc

@@ -906,9 +906,8 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
    if (_config->FindB("Dpkg::ApportFailureReport",true) == false)
    if (_config->FindB("Dpkg::ApportFailureReport",true) == false)
       return;
       return;
 
 
-   // only report the first error if we are in StopOnError=false mode
-   // to prevent bogus reports
-   if((_config->FindB("Dpkg::StopOnError",true) == false) && pkgFailures > 1)
+   // only report the first error
+   if(pkgFailures > _config->FindI("APT::Apport::MaxReports", 3))
       return;
       return;
 
 
    // get the pkgname and reportfile
    // get the pkgname and reportfile

+ 8 - 0
debian/changelog

@@ -1,3 +1,11 @@
+apt (0.7.9ubuntu6) hardy; urgency=low
+
+  * apt-pkg/deb/dpkgpm.cc:
+    - add APT::Apport::MaxReports to limit the maximum number
+      of reports generated in a single run (default to 3)
+
+ --
+
 apt (0.7.9ubuntu5) hardy; urgency=low
 apt (0.7.9ubuntu5) hardy; urgency=low
 
 
   * Merged apt-authentication-reliabilty branch. This means
   * Merged apt-authentication-reliabilty branch. This means