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
=== modified file 'DistUpgrade/DistUpgradeApport.py'
--- DistUpgrade/DistUpgradeApport.py 2011-04-28 14:59:41 +0000
+++ DistUpgrade/DistUpgradeApport.py 2011-06-03 18:28:29 +0000
@@ -21,6 +21,7 @@
21 # now add the files in /var/log/dist-upgrade/*21 # now add the files in /var/log/dist-upgrade/*
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'):
23 report = Report()23 report = Report()
24 report['Tags'] = 'dist-upgrade'
24 for fname in os.listdir("/var/log/dist-upgrade/"):25 for fname in os.listdir("/var/log/dist-upgrade/"):
25 f = os.path.join("/var/log/dist-upgrade",fname)26 f = os.path.join("/var/log/dist-upgrade",fname)
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:
2728
=== modified file 'DistUpgrade/DistUpgradeCache.py'
--- DistUpgrade/DistUpgradeCache.py 2011-05-02 12:24:48 +0000
+++ DistUpgrade/DistUpgradeCache.py 2011-06-03 18:28:29 +0000
@@ -647,10 +647,9 @@
647 details += _("This is most likely a transient problem, "647 details += _("This is most likely a transient problem, "
648 "please try again later.")648 "please try again later.")
649 else:649 else:
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 "
651 "the 'update-manager' package and include the files in "651 "the command 'ubuntu-bug update-manager' in a terminal."
652 "/var/log/dist-upgrade/ in the bug report.")652 # make the error text available again on stdout for the
653 # make the error text available again on stdout for the
654 # text frontend653 # text frontend
655 self._stopAptResolverLog()654 self._stopAptResolverLog()
656 view.error(_("Could not calculate the upgrade"), details)655 view.error(_("Could not calculate the upgrade"), details)
@@ -860,7 +859,9 @@
860 view.error(_("Can't install '%s'") % key,859 view.error(_("Can't install '%s'") % key,
861 _("It was impossible to install a "860 _("It was impossible to install a "
862 "required package. Please report "861 "required package. Please report "
863 "this as a bug. "))862 "this as a bug using "
863 "'ubuntu-bug update-manager' in "
864 "a terminal."))
864 return False865 return False
865 logging.debug("marked_install: '%s' -> '%s'" % (key, self[key].marked_install))866 logging.debug("marked_install: '%s' -> '%s'" % (key, self[key].marked_install))
866 break867 break
867868
=== modified file 'DistUpgrade/DistUpgradeController.py'
--- DistUpgrade/DistUpgradeController.py 2011-05-02 12:08:00 +0000
+++ DistUpgrade/DistUpgradeController.py 2011-06-03 18:28:29 +0000
@@ -718,7 +718,9 @@
718 self._view.error(_("Repository information invalid"),718 self._view.error(_("Repository information invalid"),
719 _("Upgrading the repository information "719 _("Upgrading the repository information "
720 "resulted in a invalid file. Please "720 "resulted in a invalid file. Please "
721 "report this as a bug."))721 "report this as a bug using the command "
722 "'ubuntu-bug update-manager' in a "
723 "terminal."))
722 return False724 return False
723725
724 if self.sources_disabled:726 if self.sources_disabled:
@@ -1037,8 +1039,9 @@
1037 "will run now (dpkg --configure -a).")1039 "will run now (dpkg --configure -a).")
1038 if not self._partialUpgrade:1040 if not self._partialUpgrade:
1039 if not run_apport():1041 if not run_apport():
1040 msg += _("\n\nPlease report this bug against the 'update-manager' "1042 msg += _("\n\nPlease report this bug using the command "
1041 "package and include the files in /var/log/dist-upgrade/ "1043 "'ubuntu-bug update-manager' in a terminal and "
1044 "include the files in /var/log/dist-upgrade/ "
1042 "in the bug report.\n"1045 "in the bug report.\n"
1043 "%s" % e)1046 "%s" % e)
1044 self._view.error(_("Could not install the upgrades"), msg)1047 self._view.error(_("Could not install the upgrades"), msg)
@@ -1497,11 +1500,11 @@
1497 logging.error("self.prepared() failed")1500 logging.error("self.prepared() failed")
1498 self._view.error(_("Preparing the upgrade failed"),1501 self._view.error(_("Preparing the upgrade failed"),
1499 _("Preparing the system for the upgrade "1502 _("Preparing the system for the upgrade "
1500 "failed. Please report this as a bug "1503 "failed. Please report this using the "
1501 "against the 'update-manager' "1504 "command 'ubuntu-bug update-manager' "
1502 "package and include the files in "1505 "in a terminal and include the files "
1503 "/var/log/dist-upgrade/ "1506 "in /var/log/dist-upgrade/ "
1504 "in the bug report." ))1507 "in the bug report."))
1505 sys.exit(1)1508 sys.exit(1)
15061509
1507 # mvo: commented out for now, see #54234, this needs to be1510 # mvo: commented out for now, see #54234, this needs to be
@@ -1519,10 +1522,11 @@
1519 "the original system state.\n"1522 "the original system state.\n"
1520 "\n"1523 "\n"
1521 "Please report this as a bug "1524 "Please report this as a bug "
1522 "against the 'update-manager' "1525 "using the command "
1523 "package and include the files in "1526 "'ubuntu-bug update-manager' in a "
1527 "terminal and include the files in "
1524 "/var/log/dist-upgrade/ "1528 "/var/log/dist-upgrade/ "
1525 "in the bug report." ))1529 "in the bug report."))
1526 self.abort()1530 self.abort()
15271531
1528 # run a "apt-get update" now, its ok to ignore errors, 1532 # run a "apt-get update" now, its ok to ignore errors,
@@ -1584,8 +1588,9 @@
1584 "updated the essential package '%s' can "1588 "updated the essential package '%s' can "
1585 "not be found anymore.\n"1589 "not be found anymore.\n"
1586 "This indicates a serious error, please "1590 "This indicates a serious error, please "
1587 "report this bug against the 'update-manager' "1591 "report this bug using the command "
1588 "package and include the files in /var/log/dist-upgrade/ "1592 "'ubuntu-bug update-manager' in a terminal "
1593 "and include the files in /var/log/dist-upgrade/ "
1589 "in the bug report.") % pkg)1594 "in the bug report.") % pkg)
1590 self.abort()1595 self.abort()
15911596
15921597
=== modified file 'UpdateManager/Core/DistUpgradeFetcherCore.py'
--- UpdateManager/Core/DistUpgradeFetcherCore.py 2011-05-27 08:33:07 +0000
+++ UpdateManager/Core/DistUpgradeFetcherCore.py 2011-06-03 18:28:29 +0000
@@ -134,7 +134,7 @@
134 if not os.path.exists(script):134 if not os.path.exists(script):
135 return self.error(_("Could not run the upgrade tool"),135 return self.error(_("Could not run the upgrade tool"),
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. "
137 "Please report it as a bug"))137 "Please report it as a bug using the command 'ubuntu-bug update-manager'."))
138 return True138 return True
139139
140 def mirror_from_sources_list(self, uri, default_uri):140 def mirror_from_sources_list(self, uri, default_uri):
@@ -278,7 +278,7 @@
278 except OSError, e:278 except OSError, e:
279 if e.errno == 13:279 if e.errno == 13:
280 self.error(_("Can not run the upgrade"),280 self.error(_("Can not run the upgrade"),
281 _("This usually is caused by a system were /tmp "281 _("This usually is caused by a system where /tmp "
282 "is mounted noexec. Please remount without "282 "is mounted noexec. Please remount without "
283 "noexec and run the upgrade again."))283 "noexec and run the upgrade again."))
284 return False284 return False
285285
=== modified file 'debian/changelog'
--- debian/changelog 2011-05-27 08:29:28 +0000
+++ debian/changelog 2011-06-03 18:28:29 +0000
@@ -13,6 +13,8 @@
13 [ Brian Murray ]13 [ Brian Murray ]
14 * do-release-upgrade: display version of the new release available not the14 * do-release-upgrade: display version of the new release available not the
15 code name15 code name
16 * add an apport hook for update-manager and modify bug reporting
17 instructions to recommend using apport (LP: #721382)
1618
17 -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 19 May 2011 09:51:39 +020019 -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 19 May 2011 09:51:39 +0200
1820
1921
=== added file 'debian/source_update-manager.py'
--- debian/source_update-manager.py 1970-01-01 00:00:00 +0000
+++ debian/source_update-manager.py 2011-06-03 18:28:29 +0000
@@ -0,0 +1,22 @@
1'''apport package hook for update-manager
2
3(c) 2011 Canonical Ltd.
4Author: Brian Murray <brian@ubuntu.com>
5'''
6
7from apport.hookutils import *
8
9
10def add_info(report):
11
12 # collect gconf settings for update-manager
13 report['GconfUpdateManager'] = command_output(['gconftool-2', '-R',
14 '/apps/update-manager'])
15 # grab the non-default values too as it is easier to compare with both the
16 # settings and the non-default values
17 attach_gconf(report, 'update-manager')
18 attach_file_if_exists(report, '/var/log/apt/history.log',
19 'DpkgHistoryLog.txt')
20 attach_root_command_outputs(report,
21 {'DpkgTerminalLog.txt': 'cat /var/log/apt/term.log',
22 'CurrentDmesg.txt': 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'})
023
=== modified file 'debian/update-manager-core.install'
--- debian/update-manager-core.install 2010-04-13 13:43:00 +0000
+++ debian/update-manager-core.install 2011-06-03 18:28:29 +0000
@@ -11,3 +11,4 @@
11debian/tmp/usr/share/computerjanitor11debian/tmp/usr/share/computerjanitor
12debian/release-upgrade-motd usr/lib/update-manager12debian/release-upgrade-motd usr/lib/update-manager
13debian/91-release-upgrade etc/update-motd.d/13debian/91-release-upgrade etc/update-motd.d/
14debian/source_update-manager.py /usr/share/apport/package-hooks/

Subscribers

People subscribed via source and target branches

to status/vote changes: