~jibel/update-manager/AutoUpgradeTester-desktoptests

« back to all changes in this revision

Viewing changes to DistUpgrade/DistUpgradeController.py

  • Committer: Brian Murray
  • Date: 2012-01-10 10:11:57 UTC
  • Revision ID: brian@ubuntu.com-20120110101157-qj6lbe7xsncubn77
* DistUpgrade/DistUpgradeController.py
  - call apport-cli directly for bug reporting of errors

Show diffs side-by-side

added added

removed removed

Lines of Context:
756
756
            logging.error("Repository information invalid after updating (we broke it!)")
757
757
            self._view.error(_("Repository information invalid"),
758
758
                             _("Upgrading the repository information "
759
 
                               "resulted in a invalid file. Please "
760
 
                               "report this as a bug using the command "
761
 
                               "'ubuntu-bug update-manager' in a "
762
 
                               "terminal."))
 
759
                               "resulted in a invalid file so a bug "
 
760
                               "reporting process is being started."))
 
761
            subprocess.Popen(["apport-bug", "update-manager"])
763
762
            return False
764
763
 
765
764
        if self.sources_disabled:
1090
1089
                        "will run now (dpkg --configure -a).")
1091
1090
                if not self._partialUpgrade:
1092
1091
                    if not run_apport():
1093
 
                        msg += _("\n\nPlease report this bug using the command "
1094
 
                                 "'ubuntu-bug update-manager' in a terminal and "
1095
 
                                 "include the files in /var/log/dist-upgrade/ "
1096
 
                                 "in the bug report.\n"
 
1092
                        msg += _("\n\nPlease report this bug in a browser at "
 
1093
                                 "http://bugs.launchpad.net/ubuntu/+source/update-manager/+filebug "
 
1094
                                 "and attach the files in /var/log/dist-upgrade/ "
 
1095
                                 "to the bug report.\n"
1097
1096
                                 "%s" % e)
1098
1097
                self._view.error(_("Could not install the upgrades"), msg)
1099
1098
                # installing the packages failed, can't be retried
1543
1542
            logging.error("self.prepared() failed")
1544
1543
            self._view.error(_("Preparing the upgrade failed"),
1545
1544
                             _("Preparing the system for the upgrade "
1546
 
                               "failed. Please report this using the "
1547
 
                               "command 'ubuntu-bug update-manager' "
1548
 
                               "in a terminal and include the files "
1549
 
                               "in /var/log/dist-upgrade/ "
1550
 
                               "in the bug report."))
 
1545
                               "failed so a bug reporting process is"
 
1546
                               "being started."))
 
1547
            subprocess.Popen(["apport-bug", "update-manager"])
1551
1548
            sys.exit(1)
1552
1549
 
1553
1550
        # mvo: commented out for now, see #54234, this needs to be
1564
1561
                                   "The upgrade will abort now and restore "
1565
1562
                                   "the original system state.\n"
1566
1563
                                   "\n"
1567
 
                                   "Please report this as a bug "
1568
 
                                   "using the command "
1569
 
                                   "'ubuntu-bug update-manager' in a "
1570
 
                                   "terminal and include the files in "
1571
 
                                   "/var/log/dist-upgrade/ "
1572
 
                                   "in the bug report."))
 
1564
                                   "Additionally, a bug reporting process is "
 
1565
                                   "being started."))
 
1566
                subprocess.Popen(["apport-bug", "update-manager"])
1573
1567
                self.abort()
1574
1568
 
1575
1569
        # run a "apt-get update" now, its ok to ignore errors, 
1625
1619
                #        but we need to be careful to not duplicate them
1626
1620
                #        (i.e. the error here could be something else than
1627
1621
                #        missing sources entries but network errors etc)
1628
 
                logging.error("No '%s' available/downloadable after sources.list rewrite+update" % pkg) 
 
1622
                logging.error("No '%s' available/downloadable after sources.list rewrite+update" % pkg)
1629
1623
                self._view.error(_("Invalid package information"),
1630
1624
                                 _("After your package information was "
1631
1625
                                   "updated the essential package '%s' can "
1632
 
                                   "not be found anymore.\n"
1633
 
                                   "This indicates a serious error, please "
1634
 
                                   "report this bug using the command "
1635
 
                                   "'ubuntu-bug update-manager' in a terminal "
1636
 
                                   "and include the files in /var/log/dist-upgrade/ "
1637
 
                                   "in the bug report.") % pkg)
 
1626
                                   "not be found anymore so "
 
1627
                                   "a bug reporting process is being "
 
1628
                                   "started." % pkg)
 
1629
                subprocess.Popen(["apport-bug", "update-manager"])
1638
1630
                self.abort()
1639
1631
 
1640
1632
        # calc the dist-upgrade and see if the removals are ok/expected