Merge lp:~brian-murray/update-manager/apport-hook into lp:update-manager

Proposed by Brian Murray
Status: Merged
Merged at revision: 2123
Proposed branch: lp:~brian-murray/update-manager/apport-hook
Merge into: lp:update-manager
Diff against target: 182 lines (+52/-20)
7 files modified
DistUpgrade/DistUpgradeApport.py (+1/-0)
DistUpgrade/DistUpgradeCache.py (+6/-5)
DistUpgrade/DistUpgradeController.py (+18/-13)
UpdateManager/Core/DistUpgradeFetcherCore.py (+2/-2)
debian/changelog (+2/-0)
debian/source_update-manager.py (+22/-0)
debian/update-manager-core.install (+1/-0)
To merge this branch: bzr merge lp:~brian-murray/update-manager/apport-hook
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+63282@code.launchpad.net
To post a comment you must log in.
2124. By Brian Murray

really add apport hook

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'DistUpgrade/DistUpgradeApport.py'
2--- DistUpgrade/DistUpgradeApport.py 2011-04-28 14:59:41 +0000
3+++ DistUpgrade/DistUpgradeApport.py 2011-06-03 18:28:29 +0000
4@@ -21,6 +21,7 @@
5 # now add the files in /var/log/dist-upgrade/*
6 if os.path.exists('/var/crash/_usr_bin_update-manager.0.crash'):
7 report = Report()
8+ report['Tags'] = 'dist-upgrade'
9 for fname in os.listdir("/var/log/dist-upgrade/"):
10 f = os.path.join("/var/log/dist-upgrade",fname)
11 if not os.path.isfile(f) or os.path.getsize(f) == 0:
12
13=== modified file 'DistUpgrade/DistUpgradeCache.py'
14--- DistUpgrade/DistUpgradeCache.py 2011-05-02 12:24:48 +0000
15+++ DistUpgrade/DistUpgradeCache.py 2011-06-03 18:28:29 +0000
16@@ -647,10 +647,9 @@
17 details += _("This is most likely a transient problem, "
18 "please try again later.")
19 else:
20- details += _("If none of this applies, then please report this bug against "
21- "the 'update-manager' package and include the files in "
22- "/var/log/dist-upgrade/ in the bug report.")
23- # make the error text available again on stdout for the
24+ details += _("If none of this applies, then please report this bug using "
25+ "the command 'ubuntu-bug update-manager' in a terminal."
26+ # make the error text available again on stdout for the
27 # text frontend
28 self._stopAptResolverLog()
29 view.error(_("Could not calculate the upgrade"), details)
30@@ -860,7 +859,9 @@
31 view.error(_("Can't install '%s'") % key,
32 _("It was impossible to install a "
33 "required package. Please report "
34- "this as a bug. "))
35+ "this as a bug using "
36+ "'ubuntu-bug update-manager' in "
37+ "a terminal."))
38 return False
39 logging.debug("marked_install: '%s' -> '%s'" % (key, self[key].marked_install))
40 break
41
42=== modified file 'DistUpgrade/DistUpgradeController.py'
43--- DistUpgrade/DistUpgradeController.py 2011-05-02 12:08:00 +0000
44+++ DistUpgrade/DistUpgradeController.py 2011-06-03 18:28:29 +0000
45@@ -718,7 +718,9 @@
46 self._view.error(_("Repository information invalid"),
47 _("Upgrading the repository information "
48 "resulted in a invalid file. Please "
49- "report this as a bug."))
50+ "report this as a bug using the command "
51+ "'ubuntu-bug update-manager' in a "
52+ "terminal."))
53 return False
54
55 if self.sources_disabled:
56@@ -1037,8 +1039,9 @@
57 "will run now (dpkg --configure -a).")
58 if not self._partialUpgrade:
59 if not run_apport():
60- msg += _("\n\nPlease report this bug against the 'update-manager' "
61- "package and include the files in /var/log/dist-upgrade/ "
62+ msg += _("\n\nPlease report this bug using the command "
63+ "'ubuntu-bug update-manager' in a terminal and "
64+ "include the files in /var/log/dist-upgrade/ "
65 "in the bug report.\n"
66 "%s" % e)
67 self._view.error(_("Could not install the upgrades"), msg)
68@@ -1497,11 +1500,11 @@
69 logging.error("self.prepared() failed")
70 self._view.error(_("Preparing the upgrade failed"),
71 _("Preparing the system for the upgrade "
72- "failed. Please report this as a bug "
73- "against the 'update-manager' "
74- "package and include the files in "
75- "/var/log/dist-upgrade/ "
76- "in the bug report." ))
77+ "failed. Please report this using the "
78+ "command 'ubuntu-bug update-manager' "
79+ "in a terminal and include the files "
80+ "in /var/log/dist-upgrade/ "
81+ "in the bug report."))
82 sys.exit(1)
83
84 # mvo: commented out for now, see #54234, this needs to be
85@@ -1519,10 +1522,11 @@
86 "the original system state.\n"
87 "\n"
88 "Please report this as a bug "
89- "against the 'update-manager' "
90- "package and include the files in "
91+ "using the command "
92+ "'ubuntu-bug update-manager' in a "
93+ "terminal and include the files in "
94 "/var/log/dist-upgrade/ "
95- "in the bug report." ))
96+ "in the bug report."))
97 self.abort()
98
99 # run a "apt-get update" now, its ok to ignore errors,
100@@ -1584,8 +1588,9 @@
101 "updated the essential package '%s' can "
102 "not be found anymore.\n"
103 "This indicates a serious error, please "
104- "report this bug against the 'update-manager' "
105- "package and include the files in /var/log/dist-upgrade/ "
106+ "report this bug using the command "
107+ "'ubuntu-bug update-manager' in a terminal "
108+ "and include the files in /var/log/dist-upgrade/ "
109 "in the bug report.") % pkg)
110 self.abort()
111
112
113=== modified file 'UpdateManager/Core/DistUpgradeFetcherCore.py'
114--- UpdateManager/Core/DistUpgradeFetcherCore.py 2011-05-27 08:33:07 +0000
115+++ UpdateManager/Core/DistUpgradeFetcherCore.py 2011-06-03 18:28:29 +0000
116@@ -134,7 +134,7 @@
117 if not os.path.exists(script):
118 return self.error(_("Could not run the upgrade tool"),
119 _("Could not run the upgrade tool") + ". " + _("This is most likely a bug in the upgrade tool. "
120- "Please report it as a bug"))
121+ "Please report it as a bug using the command 'ubuntu-bug update-manager'."))
122 return True
123
124 def mirror_from_sources_list(self, uri, default_uri):
125@@ -278,7 +278,7 @@
126 except OSError, e:
127 if e.errno == 13:
128 self.error(_("Can not run the upgrade"),
129- _("This usually is caused by a system were /tmp "
130+ _("This usually is caused by a system where /tmp "
131 "is mounted noexec. Please remount without "
132 "noexec and run the upgrade again."))
133 return False
134
135=== modified file 'debian/changelog'
136--- debian/changelog 2011-05-27 08:29:28 +0000
137+++ debian/changelog 2011-06-03 18:28:29 +0000
138@@ -13,6 +13,8 @@
139 [ Brian Murray ]
140 * do-release-upgrade: display version of the new release available not the
141 code name
142+ * add an apport hook for update-manager and modify bug reporting
143+ instructions to recommend using apport (LP: #721382)
144
145 -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 19 May 2011 09:51:39 +0200
146
147
148=== added file 'debian/source_update-manager.py'
149--- debian/source_update-manager.py 1970-01-01 00:00:00 +0000
150+++ debian/source_update-manager.py 2011-06-03 18:28:29 +0000
151@@ -0,0 +1,22 @@
152+'''apport package hook for update-manager
153+
154+(c) 2011 Canonical Ltd.
155+Author: Brian Murray <brian@ubuntu.com>
156+'''
157+
158+from apport.hookutils import *
159+
160+
161+def add_info(report):
162+
163+ # collect gconf settings for update-manager
164+ report['GconfUpdateManager'] = command_output(['gconftool-2', '-R',
165+ '/apps/update-manager'])
166+ # grab the non-default values too as it is easier to compare with both the
167+ # settings and the non-default values
168+ attach_gconf(report, 'update-manager')
169+ attach_file_if_exists(report, '/var/log/apt/history.log',
170+ 'DpkgHistoryLog.txt')
171+ attach_root_command_outputs(report,
172+ {'DpkgTerminalLog.txt': 'cat /var/log/apt/term.log',
173+ 'CurrentDmesg.txt': 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'})
174
175=== modified file 'debian/update-manager-core.install'
176--- debian/update-manager-core.install 2010-04-13 13:43:00 +0000
177+++ debian/update-manager-core.install 2011-06-03 18:28:29 +0000
178@@ -11,3 +11,4 @@
179 debian/tmp/usr/share/computerjanitor
180 debian/release-upgrade-motd usr/lib/update-manager
181 debian/91-release-upgrade etc/update-motd.d/
182+debian/source_update-manager.py /usr/share/apport/package-hooks/

Subscribers

People subscribed via source and target branches

to status/vote changes: