~bryce/apport/bug-1831802

« back to all changes in this revision

Viewing changes to data/general-hooks/generic.py

  • Committer: bryce
  • Date: 2019-06-05 21:03:48 UTC
  • Revision ID: bryce@bryceharrington.org-20190605210348-fjhcz0u49r98cfkc
data/general-hooks/generic.py: Don't file bug reports about out-of-space conditions

For package installation problems, if the problem is due to insufficient
disk space then treat it as an unreportable error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
    in_gl = '/usr/lib/libGL.so' in (report.get('StacktraceTop') or '\n').splitlines()[0]
82
82
    if in_gl and 'Loading extension GLX' not in apport.hookutils.read_file('/var/log/Xorg.0.log'):
83
83
        report['UnreportableReason'] = 'The X.org server does not support the GLX extension, which the crashed program expected to use.'
 
84
 
 
85
    # filter out package install failures due to insufficient disk space
 
86
    if 'ERROR: There\'s not enough space in' in report.get('DpkgTerminalLog')
 
87
        and report['ProblemType'] == 'Package':
 
88
        report['UnreportableReason'] = 'The package installation failed because your system did not have enough free space available. Please free some space to avoid problems using applications and installing updates.'
 
89
 
84
90
    # filter out package install failures due to a segfault
85
91
    if 'Segmentation fault' in report.get('ErrorMessage', '') \
86
92
            and report['ProblemType'] == 'Package':