File: source_upgrade-system.py

package info (click to toggle)
upgrade-system 1.7.3.0
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 96 kB
  • ctags: 2
  • sloc: sh: 214; python: 22; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 897 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*-

'''
Apport package hook for upgrade-system (originally for update-manager)
Copyright: © 2011 Brian Murray <brian@ubuntu.com>
'''

import re
from apport.hookutils import (
    attach_gsettings_package, attach_root_command_outputs,
    attach_file_if_exists, recent_syslog)

def add_info(report, ui):

    try:
        attach_gsettings_package(report, 'upgrade-system')
    except:
        pass
    attach_file_if_exists(report, '/var/log/apt/history.log',
                          'DpkgHistoryLog.txt')
    attach_file_if_exists(report, '/var/log/apt/term.log',
                          'DpkgTerminalLog.txt')
    attach_root_command_outputs(
        report,
        {'CurrentDmesg.txt':
            'dmesg | comm -13 --nocheck-order /var/log/dmesg -'})
    report["Aptdaemon"] = recent_syslog(re.compile("AptDaemon"))