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

Proposed by Brian Murray
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 Approve
Review via email: mp+68846@code.launchpad.net
To post a comment you must log in.
Revision history for this message
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
=== modified file 'apport/hookutils.py'
--- apport/hookutils.py 2011-07-20 16:34:35 +0000
+++ apport/hookutils.py 2011-07-22 14:10:55 +0000
@@ -100,7 +100,8 @@
100 # conffiles100 # conffiles
101 path, default_md5sum = line.strip().split()[:2]101 path, default_md5sum = line.strip().split()[:2]
102102
103 if conffiles and path not in conffiles: continue103 if conffiles and path not in conffiles:
104 continue
104105
105 key = 'modified.conffile.' + path_to_key(path)106 key = 'modified.conffile.' + path_to_key(path)
106107
@@ -126,6 +127,33 @@
126 else:127 else:
127 report[key] = '[deleted]'128 report[key] = '[deleted]'
128129
130
131def attach_upstart_overrides(report, package):
132 '''Attach information about any Upstart override files'''
133
134 try:
135 dpkg = subprocess.Popen(['dpkg-query','-W','--showformat=${Conffiles}',
136 package], stdout=subprocess.PIPE, close_fds=True)
137 except OSError, e:
138 return 'Error: ' + str(e)
139
140 out = dpkg.communicate()[0]
141 if dpkg.returncode != 0:
142 return
143
144 for line in out.splitlines():
145 if not line:
146 continue
147 conffile = line.strip().split()[0]
148
149 if os.path.exists(conffile) and '/etc/init/' in conffile:
150 override = conffile.replace('.conf', '.override')
151 title = override.replace('/etc/init/', '')
152 if os.path.exists(override):
153 contents = open(override).read()
154 report[title] = contents
155
156
129def attach_dmesg(report):157def attach_dmesg(report):
130 '''Attach information from the kernel ring buffer (dmesg).158 '''Attach information from the kernel ring buffer (dmesg).
131159
132160
=== modified file 'data/general-hooks/ubuntu.py'
--- data/general-hooks/ubuntu.py 2011-07-22 13:34:03 +0000
+++ data/general-hooks/ubuntu.py 2011-07-22 14:10:55 +0000
@@ -60,13 +60,19 @@
6060
61 if 'Package' in report:61 if 'Package' in report:
62 package = report['Package'].split()[0]62 package = report['Package'].split()[0]
63 if package and 'attach_conffiles' in dir():63 if package:
64 attach_conffiles(report, package, ui)64 attach_conffiles(report, package, ui=ui)
6565
66 # do not file bugs against "upgrade-system" if it is not installed (LP#404727)66 # do not file bugs against "upgrade-system" if it is not installed (LP#404727)
67 if package == 'upgrade-system' and 'not installed' in report['Package']:67 if package == 'upgrade-system' and 'not installed' in report['Package']:
68 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.'68 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.'
6969
70 problemtype = report.get('ProblemType', '')
71 if problemtype in ['Bug', 'Package', 'Crash']:
72 package = report['Package'].split()[0]
73 if package:
74 attach_upstart_overrides(report, package)
75
70 # running Unity?76 # running Unity?
71 username = pwd.getpwuid(os.geteuid()).pw_name77 username = pwd.getpwuid(os.geteuid()).pw_name
72 if subprocess.call(['killall', '-s0', '-u', username,78 if subprocess.call(['killall', '-s0', '-u', username,
7379
=== modified file 'data/package-hooks/source_ubiquity.py'
--- data/package-hooks/source_ubiquity.py 2011-07-07 21:05:32 +0000
+++ data/package-hooks/source_ubiquity.py 2011-07-22 14:10:55 +0000
@@ -33,8 +33,6 @@
33 raise StopIteration33 raise StopIteration
34 if response:34 if response:
35 add_installation_log(report, 'UbiquityDebug', 'debug')35 add_installation_log(report, 'UbiquityDebug', 'debug')
36 if os.path.exists('/var/log/installer/dm'):36 add_installation_log(report, 'UbiquityDm', 'dm')
37 report['UbiquityDm'] = ('/var/log/installer/dm',)
38 add_installation_log(report, 'Casper', 'casper.log')37 add_installation_log(report, 'Casper', 'casper.log')
39 if os.path.exists('/var/log/oem-config.log'):38 add_installation_log(report, 'OemConfigLog', 'oem-config.log')
40 report['OemConfigLog'] = ('/var/log/oem-config.log',)
4139
=== modified file 'debian/changelog'
--- debian/changelog 2011-07-22 13:34:03 +0000
+++ debian/changelog 2011-07-22 14:10:55 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1apport (1.21.2-0ubuntu7) UNRELEASED; urgency=low2apport (1.21.2-0ubuntu7) UNRELEASED; urgency=low
23
3 * data/general-hooks/ubuntu.py: Fix calling of add_info() in the __main__4 * data/general-hooks/ubuntu.py: Fix calling of add_info() in the __main__
@@ -5,6 +6,19 @@
56
6 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 22 Jul 2011 15:33:45 +02007 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 22 Jul 2011 15:33:45 +0200
78
9=======
10apport (1.21.2-0ubuntu7) oneiric; urgency=low
11
12 * data/package-hooks/source_ubiquity.py:
13 - collect all logs using root_command_outputs (LP: #812738)
14 * apport/hookutils.py:
15 - check to see if the package has any upstart override files
16 * data/general-hooks/ubuntu.py:
17 - when reporting a problem use the upstart override check (LP: #803977)
18
19 -- Brian Murray <brian@ubuntu.com> Thu, 21 Jul 2011 14:41:54 -0700
20
21>>>>>>> MERGE-SOURCE
8apport (1.21.2-0ubuntu6) oneiric; urgency=low22apport (1.21.2-0ubuntu6) oneiric; urgency=low
923
10 * data/general-hooks/ubuntu.py:24 * data/general-hooks/ubuntu.py:

Subscribers

People subscribed via source and target branches