~ubuntu-branches/ubuntu/intrepid/apport/intrepid-security

« back to all changes in this revision

Viewing changes to apport/packaging.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2008-05-17 12:44:21 UTC
  • Revision ID: package-import@ubuntu.com-20080517124421-mxhqqgu38wqrcnr3
Tags: 0.110
* apport/chroot.py: In the test suite, copy some system binaries/libraries
  into a fakechroot and exercise a lot of standard shell commands (cp, ln
  -s, rm, rm -r, mkdir, echo, chmod, chown, etc.) with absolute/relative
  paths.  This reproduces the total breakage of rm'ing, chmod'ing, and
  chown'ing absolute paths in hardy fakechroots.
* bin/crash-digger: Intercept exceptions when downloading crash reports for
  duplicate checking, so that the retracer does not crash on malformed bug
  reports. (LP: #205178)
* apport/packaging.py: Introduce a new function enabled() which reports
  whether Apport should create crash reports. Signal crashes are controlled
  by /proc/sys/kernel/core_pattern, but we need that to control whether
  reports for Python, package, or kernel crashes are generated.
* backends/packaging-apt-dpkg.py: Provide implementation for
  PackageInfo.enabled() for Debian/Ubuntu by evaluating /etc/default/apport.
  Add various test cases for different configuration files and absent files.
* apport_python_hook.py: Do not create reports if Apport is disabled (in
  /etc/default/apport). (LP: #222260)

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
 
107
107
        raise NotImplementedError, 'this method must be implemented by a concrete subclass'
108
108
 
 
109
    def enabled(self):
 
110
        '''Return whether Apport should generate crash reports.
 
111
 
 
112
        Signal crashes are controlled by /proc/sys/kernel/core_pattern, but
 
113
        some init script needs to set that value based on a configuration file.
 
114
        This also determines whether Apport generates reports for Python,
 
115
        package, or kernel crashes.
 
116
        
 
117
        Implementations should parse the configuration file which controls
 
118
        Apport (such as /etc/default/apport in Debian/Ubuntu).
 
119
        '''
 
120
        raise NotImplementedError, 'this method must be implemented by a concrete subclass'
 
121
 
109
122
import packaging_impl