Merge lp:~brian-murray/ubuntu/oneiric/apport/ubiquity-and-overrides into lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu

Proposed by Brian Murray on 2011-07-22
Status: Merged
Merged at revision: 1805
Proposed branch: lp:~brian-murray/ubuntu/oneiric/apport/ubiquity-and-overrides
Merge into: lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu
Diff against target: 117 lines (+53/-7) (has conflicts)
4 files modified
apport/hookutils.py (+29/-1)
data/general-hooks/ubuntu.py (+8/-2)
data/package-hooks/source_ubiquity.py (+2/-4)
debian/changelog (+14/-0)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~brian-murray/ubuntu/oneiric/apport/ubiquity-and-overrides
Reviewer Review Type Date Requested Status
Martin Pitt 2011-07-22 Approve on 2011-07-22
Review via email: mp+68846@code.launchpad.net
To post a comment you must log in.
Martin Pitt (pitti) wrote :

Committed with a few small code cleanups, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apport/hookutils.py'
2--- apport/hookutils.py 2011-07-20 16:34:35 +0000
3+++ apport/hookutils.py 2011-07-22 14:10:55 +0000
4@@ -100,7 +100,8 @@
5 # conffiles
6 path, default_md5sum = line.strip().split()[:2]
7
8- if conffiles and path not in conffiles: continue
9+ if conffiles and path not in conffiles:
10+ continue
11
12 key = 'modified.conffile.' + path_to_key(path)
13
14@@ -126,6 +127,33 @@
15 else:
16 report[key] = '[deleted]'
17
18+
19+def attach_upstart_overrides(report, package):
20+ '''Attach information about any Upstart override files'''
21+
22+ try:
23+ dpkg = subprocess.Popen(['dpkg-query','-W','--showformat=${Conffiles}',
24+ package], stdout=subprocess.PIPE, close_fds=True)
25+ except OSError, e:
26+ return 'Error: ' + str(e)
27+
28+ out = dpkg.communicate()[0]
29+ if dpkg.returncode != 0:
30+ return
31+
32+ for line in out.splitlines():
33+ if not line:
34+ continue
35+ conffile = line.strip().split()[0]
36+
37+ if os.path.exists(conffile) and '/etc/init/' in conffile:
38+ override = conffile.replace('.conf', '.override')
39+ title = override.replace('/etc/init/', '')
40+ if os.path.exists(override):
41+ contents = open(override).read()
42+ report[title] = contents
43+
44+
45 def attach_dmesg(report):
46 '''Attach information from the kernel ring buffer (dmesg).
47
48
49=== modified file 'data/general-hooks/ubuntu.py'
50--- data/general-hooks/ubuntu.py 2011-07-22 13:34:03 +0000
51+++ data/general-hooks/ubuntu.py 2011-07-22 14:10:55 +0000
52@@ -60,13 +60,19 @@
53
54 if 'Package' in report:
55 package = report['Package'].split()[0]
56- if package and 'attach_conffiles' in dir():
57- attach_conffiles(report, package, ui)
58+ if package:
59+ attach_conffiles(report, package, ui=ui)
60
61 # do not file bugs against "upgrade-system" if it is not installed (LP#404727)
62 if package == 'upgrade-system' and 'not installed' in report['Package']:
63 report['UnreportableReason'] = 'You do not have the upgrade-system package installed. Please report package upgrade failures against the package that failed to install, or against upgrade-manager.'
64
65+ problemtype = report.get('ProblemType', '')
66+ if problemtype in ['Bug', 'Package', 'Crash']:
67+ package = report['Package'].split()[0]
68+ if package:
69+ attach_upstart_overrides(report, package)
70+
71 # running Unity?
72 username = pwd.getpwuid(os.geteuid()).pw_name
73 if subprocess.call(['killall', '-s0', '-u', username,
74
75=== modified file 'data/package-hooks/source_ubiquity.py'
76--- data/package-hooks/source_ubiquity.py 2011-07-07 21:05:32 +0000
77+++ data/package-hooks/source_ubiquity.py 2011-07-22 14:10:55 +0000
78@@ -33,8 +33,6 @@
79 raise StopIteration
80 if response:
81 add_installation_log(report, 'UbiquityDebug', 'debug')
82- if os.path.exists('/var/log/installer/dm'):
83- report['UbiquityDm'] = ('/var/log/installer/dm',)
84+ add_installation_log(report, 'UbiquityDm', 'dm')
85 add_installation_log(report, 'Casper', 'casper.log')
86- if os.path.exists('/var/log/oem-config.log'):
87- report['OemConfigLog'] = ('/var/log/oem-config.log',)
88+ add_installation_log(report, 'OemConfigLog', 'oem-config.log')
89
90=== modified file 'debian/changelog'
91--- debian/changelog 2011-07-22 13:34:03 +0000
92+++ debian/changelog 2011-07-22 14:10:55 +0000
93@@ -1,3 +1,4 @@
94+<<<<<<< TREE
95 apport (1.21.2-0ubuntu7) UNRELEASED; urgency=low
96
97 * data/general-hooks/ubuntu.py: Fix calling of add_info() in the __main__
98@@ -5,6 +6,19 @@
99
100 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 22 Jul 2011 15:33:45 +0200
101
102+=======
103+apport (1.21.2-0ubuntu7) oneiric; urgency=low
104+
105+ * data/package-hooks/source_ubiquity.py:
106+ - collect all logs using root_command_outputs (LP: #812738)
107+ * apport/hookutils.py:
108+ - check to see if the package has any upstart override files
109+ * data/general-hooks/ubuntu.py:
110+ - when reporting a problem use the upstart override check (LP: #803977)
111+
112+ -- Brian Murray <brian@ubuntu.com> Thu, 21 Jul 2011 14:41:54 -0700
113+
114+>>>>>>> MERGE-SOURCE
115 apport (1.21.2-0ubuntu6) oneiric; urgency=low
116
117 * data/general-hooks/ubuntu.py:

Subscribers

People subscribed via source and target branches