Merge lp:~brian-murray/update-manager/apport-hook into lp:update-manager
- apport-hook
- Merge into main
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Core Development Team | Pending | ||
Review via email: mp+63282@code.launchpad.net |
Commit message
Description of the change
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 | 21 | # now add the files in /var/log/dist-upgrade/* | 21 | # now add the files in /var/log/dist-upgrade/* |
6 | 22 | if os.path.exists('/var/crash/_usr_bin_update-manager.0.crash'): | 22 | if os.path.exists('/var/crash/_usr_bin_update-manager.0.crash'): |
7 | 23 | report = Report() | 23 | report = Report() |
8 | 24 | report['Tags'] = 'dist-upgrade' | ||
9 | 24 | for fname in os.listdir("/var/log/dist-upgrade/"): | 25 | for fname in os.listdir("/var/log/dist-upgrade/"): |
10 | 25 | f = os.path.join("/var/log/dist-upgrade",fname) | 26 | f = os.path.join("/var/log/dist-upgrade",fname) |
11 | 26 | if not os.path.isfile(f) or os.path.getsize(f) == 0: | 27 | if not os.path.isfile(f) or os.path.getsize(f) == 0: |
12 | 27 | 28 | ||
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 | 647 | details += _("This is most likely a transient problem, " | 647 | details += _("This is most likely a transient problem, " |
18 | 648 | "please try again later.") | 648 | "please try again later.") |
19 | 649 | else: | 649 | else: |
24 | 650 | details += _("If none of this applies, then please report this bug against " | 650 | details += _("If none of this applies, then please report this bug using " |
25 | 651 | "the 'update-manager' package and include the files in " | 651 | "the command 'ubuntu-bug update-manager' in a terminal." |
26 | 652 | "/var/log/dist-upgrade/ in the bug report.") | 652 | # make the error text available again on stdout for the |
23 | 653 | # make the error text available again on stdout for the | ||
27 | 654 | # text frontend | 653 | # text frontend |
28 | 655 | self._stopAptResolverLog() | 654 | self._stopAptResolverLog() |
29 | 656 | view.error(_("Could not calculate the upgrade"), details) | 655 | view.error(_("Could not calculate the upgrade"), details) |
30 | @@ -860,7 +859,9 @@ | |||
31 | 860 | view.error(_("Can't install '%s'") % key, | 859 | view.error(_("Can't install '%s'") % key, |
32 | 861 | _("It was impossible to install a " | 860 | _("It was impossible to install a " |
33 | 862 | "required package. Please report " | 861 | "required package. Please report " |
35 | 863 | "this as a bug. ")) | 862 | "this as a bug using " |
36 | 863 | "'ubuntu-bug update-manager' in " | ||
37 | 864 | "a terminal.")) | ||
38 | 864 | return False | 865 | return False |
39 | 865 | logging.debug("marked_install: '%s' -> '%s'" % (key, self[key].marked_install)) | 866 | logging.debug("marked_install: '%s' -> '%s'" % (key, self[key].marked_install)) |
40 | 866 | break | 867 | break |
41 | 867 | 868 | ||
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 | 718 | self._view.error(_("Repository information invalid"), | 718 | self._view.error(_("Repository information invalid"), |
47 | 719 | _("Upgrading the repository information " | 719 | _("Upgrading the repository information " |
48 | 720 | "resulted in a invalid file. Please " | 720 | "resulted in a invalid file. Please " |
50 | 721 | "report this as a bug.")) | 721 | "report this as a bug using the command " |
51 | 722 | "'ubuntu-bug update-manager' in a " | ||
52 | 723 | "terminal.")) | ||
53 | 722 | return False | 724 | return False |
54 | 723 | 725 | ||
55 | 724 | if self.sources_disabled: | 726 | if self.sources_disabled: |
56 | @@ -1037,8 +1039,9 @@ | |||
57 | 1037 | "will run now (dpkg --configure -a).") | 1039 | "will run now (dpkg --configure -a).") |
58 | 1038 | if not self._partialUpgrade: | 1040 | if not self._partialUpgrade: |
59 | 1039 | if not run_apport(): | 1041 | if not run_apport(): |
62 | 1040 | msg += _("\n\nPlease report this bug against the 'update-manager' " | 1042 | msg += _("\n\nPlease report this bug using the command " |
63 | 1041 | "package and include the files in /var/log/dist-upgrade/ " | 1043 | "'ubuntu-bug update-manager' in a terminal and " |
64 | 1044 | "include the files in /var/log/dist-upgrade/ " | ||
65 | 1042 | "in the bug report.\n" | 1045 | "in the bug report.\n" |
66 | 1043 | "%s" % e) | 1046 | "%s" % e) |
67 | 1044 | self._view.error(_("Could not install the upgrades"), msg) | 1047 | self._view.error(_("Could not install the upgrades"), msg) |
68 | @@ -1497,11 +1500,11 @@ | |||
69 | 1497 | logging.error("self.prepared() failed") | 1500 | logging.error("self.prepared() failed") |
70 | 1498 | self._view.error(_("Preparing the upgrade failed"), | 1501 | self._view.error(_("Preparing the upgrade failed"), |
71 | 1499 | _("Preparing the system for the upgrade " | 1502 | _("Preparing the system for the upgrade " |
77 | 1500 | "failed. Please report this as a bug " | 1503 | "failed. Please report this using the " |
78 | 1501 | "against the 'update-manager' " | 1504 | "command 'ubuntu-bug update-manager' " |
79 | 1502 | "package and include the files in " | 1505 | "in a terminal and include the files " |
80 | 1503 | "/var/log/dist-upgrade/ " | 1506 | "in /var/log/dist-upgrade/ " |
81 | 1504 | "in the bug report." )) | 1507 | "in the bug report.")) |
82 | 1505 | sys.exit(1) | 1508 | sys.exit(1) |
83 | 1506 | 1509 | ||
84 | 1507 | # mvo: commented out for now, see #54234, this needs to be | 1510 | # mvo: commented out for now, see #54234, this needs to be |
85 | @@ -1519,10 +1522,11 @@ | |||
86 | 1519 | "the original system state.\n" | 1522 | "the original system state.\n" |
87 | 1520 | "\n" | 1523 | "\n" |
88 | 1521 | "Please report this as a bug " | 1524 | "Please report this as a bug " |
91 | 1522 | "against the 'update-manager' " | 1525 | "using the command " |
92 | 1523 | "package and include the files in " | 1526 | "'ubuntu-bug update-manager' in a " |
93 | 1527 | "terminal and include the files in " | ||
94 | 1524 | "/var/log/dist-upgrade/ " | 1528 | "/var/log/dist-upgrade/ " |
96 | 1525 | "in the bug report." )) | 1529 | "in the bug report.")) |
97 | 1526 | self.abort() | 1530 | self.abort() |
98 | 1527 | 1531 | ||
99 | 1528 | # run a "apt-get update" now, its ok to ignore errors, | 1532 | # run a "apt-get update" now, its ok to ignore errors, |
100 | @@ -1584,8 +1588,9 @@ | |||
101 | 1584 | "updated the essential package '%s' can " | 1588 | "updated the essential package '%s' can " |
102 | 1585 | "not be found anymore.\n" | 1589 | "not be found anymore.\n" |
103 | 1586 | "This indicates a serious error, please " | 1590 | "This indicates a serious error, please " |
106 | 1587 | "report this bug against the 'update-manager' " | 1591 | "report this bug using the command " |
107 | 1588 | "package and include the files in /var/log/dist-upgrade/ " | 1592 | "'ubuntu-bug update-manager' in a terminal " |
108 | 1593 | "and include the files in /var/log/dist-upgrade/ " | ||
109 | 1589 | "in the bug report.") % pkg) | 1594 | "in the bug report.") % pkg) |
110 | 1590 | self.abort() | 1595 | self.abort() |
111 | 1591 | 1596 | ||
112 | 1592 | 1597 | ||
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 | 134 | if not os.path.exists(script): | 134 | if not os.path.exists(script): |
118 | 135 | return self.error(_("Could not run the upgrade tool"), | 135 | return self.error(_("Could not run the upgrade tool"), |
119 | 136 | _("Could not run the upgrade tool") + ". " + _("This is most likely a bug in the upgrade tool. " | 136 | _("Could not run the upgrade tool") + ". " + _("This is most likely a bug in the upgrade tool. " |
121 | 137 | "Please report it as a bug")) | 137 | "Please report it as a bug using the command 'ubuntu-bug update-manager'.")) |
122 | 138 | return True | 138 | return True |
123 | 139 | 139 | ||
124 | 140 | def mirror_from_sources_list(self, uri, default_uri): | 140 | def mirror_from_sources_list(self, uri, default_uri): |
125 | @@ -278,7 +278,7 @@ | |||
126 | 278 | except OSError, e: | 278 | except OSError, e: |
127 | 279 | if e.errno == 13: | 279 | if e.errno == 13: |
128 | 280 | self.error(_("Can not run the upgrade"), | 280 | self.error(_("Can not run the upgrade"), |
130 | 281 | _("This usually is caused by a system were /tmp " | 281 | _("This usually is caused by a system where /tmp " |
131 | 282 | "is mounted noexec. Please remount without " | 282 | "is mounted noexec. Please remount without " |
132 | 283 | "noexec and run the upgrade again.")) | 283 | "noexec and run the upgrade again.")) |
133 | 284 | return False | 284 | return False |
134 | 285 | 285 | ||
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 | 13 | [ Brian Murray ] | 13 | [ Brian Murray ] |
140 | 14 | * do-release-upgrade: display version of the new release available not the | 14 | * do-release-upgrade: display version of the new release available not the |
141 | 15 | code name | 15 | code name |
142 | 16 | * add an apport hook for update-manager and modify bug reporting | ||
143 | 17 | instructions to recommend using apport (LP: #721382) | ||
144 | 16 | 18 | ||
145 | 17 | -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 19 May 2011 09:51:39 +0200 | 19 | -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 19 May 2011 09:51:39 +0200 |
146 | 18 | 20 | ||
147 | 19 | 21 | ||
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 | 1 | '''apport package hook for update-manager | ||
153 | 2 | |||
154 | 3 | (c) 2011 Canonical Ltd. | ||
155 | 4 | Author: Brian Murray <brian@ubuntu.com> | ||
156 | 5 | ''' | ||
157 | 6 | |||
158 | 7 | from apport.hookutils import * | ||
159 | 8 | |||
160 | 9 | |||
161 | 10 | def add_info(report): | ||
162 | 11 | |||
163 | 12 | # collect gconf settings for update-manager | ||
164 | 13 | report['GconfUpdateManager'] = command_output(['gconftool-2', '-R', | ||
165 | 14 | '/apps/update-manager']) | ||
166 | 15 | # grab the non-default values too as it is easier to compare with both the | ||
167 | 16 | # settings and the non-default values | ||
168 | 17 | attach_gconf(report, 'update-manager') | ||
169 | 18 | attach_file_if_exists(report, '/var/log/apt/history.log', | ||
170 | 19 | 'DpkgHistoryLog.txt') | ||
171 | 20 | attach_root_command_outputs(report, | ||
172 | 21 | {'DpkgTerminalLog.txt': 'cat /var/log/apt/term.log', | ||
173 | 22 | 'CurrentDmesg.txt': 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'}) | ||
174 | 0 | 23 | ||
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 | 11 | debian/tmp/usr/share/computerjanitor | 11 | debian/tmp/usr/share/computerjanitor |
180 | 12 | debian/release-upgrade-motd usr/lib/update-manager | 12 | debian/release-upgrade-motd usr/lib/update-manager |
181 | 13 | debian/91-release-upgrade etc/update-motd.d/ | 13 | debian/91-release-upgrade etc/update-motd.d/ |
182 | 14 | debian/source_update-manager.py /usr/share/apport/package-hooks/ |